Color display progress

Video demo of uploading that config: here

Sound is good. But still encounter intermittent screen drop outs, and still cannot call font.pqf.

I’ll look at the serialmonitor if you need more context

EDIT: looked at serial montior, screen dropouts are caused by “Unmounting SD Card” issues, and, when that occurs, font.scr does actually call the font.pqf. However, that is still followed by two instances of “File not found.” I’m not sure which two files are referred to here, but neither font.scr nor idle.scr have layers. Just single layer files.

I made a potential fix for this yesterday, did you grab a new copy today?

I wasn’t sure, so I just did. To confirm, I downloaded from here: GitHub - profezzorn/ProffieOS: Lightsaber Controller Software

But sure enough, immediately after uploading that to the proffie again with the same config I demo’d in the video a moment ago, got several Unmounting errors, shown here: Pastebin link


EDIT: unmounting seems to be timing out consistently around 6sec. Check this video out

Okay, further info on my last edit: not exactly every six seconds. But I’m noticing the “idle.scr” being replayed, and that generally precedes the unmounting. Further context available in this serial monitor. I took the liberty of loading my broken up virtual crystal setup (with idle, on, lock, etc. broken up into individual SCRs) and put that on the Ani3 preset. It still manages to replay “on.scr” like it does with idle, which triggers the screen to go out there too, but because the saber is pulling sound files there is no “Unmounting SD Card” issue.

So there is something that either gets re-triggered, or doesn’t get purged when loading the display files. I’m not sure if those are appropriate verbs, but hopefully this extra context helps to debug.

Noteworthy from that monitor session:

14:08:00.090 -> Playing Vader/160x80/idle.scr
14:08:00.660 -> EVENT: Clash millis=37117
14:08:03.581 -> Battery voltage: 3.98
14:08:06.167 -> Playing Vader/160x80/idle.scr
14:08:07.157 -> Unmounting SD Card.

and later

14:08:09.663 -> Playing BMF/160x80/font.scr
14:08:09.663 -> EVENT: Clash millis=46128
14:08:09.711 -> File  not found.
14:08:09.711 -> File  not found.
14:08:11.267 -> Amplifier off.
14:08:15.740 -> Playing BMF/160x80/idle.scr
14:08:21.784 -> Playing BMF/160x80/idle.scr
14:08:22.816 -> Unmounting SD Card.

then for the individually called scr events on Ani3:

14:08:46.015 -> Playing Ani3/160x80/font.scr
14:08:46.062 -> File  not found.
14:08:46.062 -> File  not found.
14:08:47.148 -> Amplifier off.
14:08:52.104 -> Playing Ani3/160x80/idle.scr
14:08:58.136 -> Playing Ani3/160x80/idle.scr
14:08:59.174 -> Unmounting SD Card.
.
.
.
14:09:03.188 -> Playing Ani3/160x80/on.scr
14:09:03.566 -> Battery voltage: 3.91
14:09:06.593 -> Playing Ani3/swingl/swingl3.wav
14:09:06.593 -> channels: 1 rate: 44100 bits: 16
14:09:08.562 -> Playing Ani3/swingh/swingh3.wav
14:09:08.562 -> channels: 1 rate: 44100 bits: 16
14:09:09.266 -> Playing Ani3/160x80/on.scr
.
.
.
14:09:15.070 -> unit = 1 vol = 0.50, Playing Ani3/blst/blst4.wav
14:09:15.070 -> channels: 1 rate: 44100 bits: 16
14:09:15.070 -> Playing Ani3/160x80/blst.scr
14:09:17.004 -> Playing Ani3/160x80/on.scr
14:09:17.570 -> Playing Ani3/hum.wav
14:09:17.570 -> channels: 1 rate: 44100 bits: 16
14:09:18.883 -> Playing Ani3/160x80/on.scr

Note that every time it secondarily called the scr file (“idle.scr”, or, in Ani3’s case, both "idle.scr’ and “on.scr”) that’s when the screen went blank.

Ok, I’ve been poking around, and noticed a few things that might explain what is going on.

  1. You have IDLE_OFF_TIME set to 8 minutes, that means that animations are supposed to cut out after 8 minutes. Is that part of what you’re seeing?
  2. You have mass storage on, and MOUNT_SD_SETTING is not defined. With that combination of defines, ProffieOS will try to interrupt idle sound and animations when USB is plugged in, otherwise you won’t be able to access the SD card. If you use MOUNT_SD_SETTING, then this behavior only occurs when sd access is on.

Does this explain what is going on?

For 1, it’s doubtful, since each test I was doing the saber never was on for 8min.

For 2, I’m not sure I understand the logic of your statement about when sd access is happening, but when I reduced my config by 1 preset to get under the size limit while using “fastest code” I had also altered the top section to not only add MOUNT_SD_SETTING, but to bring the CONFIG_BOTTOM up for clarity, as well as cleaning up some of my using styles.

The top section during the notes about timing of serial monitor events looks like the following, per an ongoing side conversation I was having with @hkwwinger :

// ProffieOS8 Config File
#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 8
#define NUM_BUTTONS 2
const unsigned int maxLedsPerStrip = 160;
//#define EXTRA_COLOR_BUFFER_SPACE 30
#define VOLUME 2500
#define CLASH_THRESHOLD_G 1.0
//#define ENABLE_AUDIO
//#define ENABLE_MOTION
//#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_SPIDISPLAY
//#define KILL_OLD_PLAYERS
//#define SHARED_POWER_PINS
#define MOTION_TIMEOUT 60 * 8 * 1000
#define IDLE_OFF_TIME 60 * 8 * 1000
#define DISABLE_BASIC_PARSER_STYLES
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ENABLE_ALL_EDIT_OPTIONS
#define SAVE_PRESET
#define KEEP_SAVEFILES_WHEN_PROGRAMMING
#define NO_REPEAT_RANDOM
#define COLOR_CHANGE_DIRECT
#define FETT263_EDIT_MODE_MENU
#define FETT263_SAY_COLOR_LIST
#define FETT263_SAY_COLOR_LIST_CC
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_MOTION_WAKE_POWER_BUTTON
//#define FETT263_TRACK_PLAYER_NO_PROMPTS
#define FETT263_DISABLE_COPY_PRESET
//#define FETT263_HOLD_BUTTON_LOCKUP
#define FETT263_RANDOMIZE_QUOTE_PLAYER
#define FETT263_BATTLE_MODE
#define FETT263_LOCKUP_DELAY 200
#define FETT263_BM_CLASH_DETECT 6
#define FETT263_THRUST_ON
#define FETT263_TWIST_ON
#define FETT263_TWIST_OFF
//#define FETT263_MULTI_PHASE
#define FETT263_SPECIAL_ABILITIES
#define MOUNT_SD_SETTING
#endif

#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif


#ifdef CONFIG_BOTTOM
SPIDisplay_DFRobot096<3> display;
StandarColorDisplayController<160, 80> display_controller(&display);
#endif

Sorry for barging in, I am following this thread with interest.
Could the above define be responsible for “blocking” some of the code update or influence the behavior of the images you want to display ?

As of Proffie OS8, these 5 defines are unnecessary because they are enabled by default.

I’ll take all the help I can get. But you’re getting at the heart of the side convo with @hkwwinger I had just mentioned. He’s the only individual I know personally who is working in OS8, and I had yet to use it. So, I was on the phone asking about new defines, specifically the MOUNT_SD_SETTINGS I also mentioned, and potentially any other fett263 prop specific defines I might need to know. He told me those were on by default now in OS8. So, I tested along the way once with all of them commented out. The config I sent earlier I turned them back on so-as not to stray too far from the tests I had been running and documenting here. @hkwwinger suggested try having both on ENABLE_SD and MOUNT_SD_SETTINGS on because the display was still dropping out with enable off and only mount on.

So, since I couldn’t recall where I was in testing with what defines, I just tried your suggestion (commenting out legacy defines) and the display dropping out after roughly six seconds persists. In other words, the only difference in testing since last post was line 13 is commented out.

Something or some setting is re-reading or re-calling (whichever verb is appropriate) the SCR/PQF that is already currently being displayed, and triggering the display to drop out.


EDIT: sorry, got your notification via email on my phone and missed the whole part about KEEP_SAVEFILES_WHEN_PROGRAMMING. So, just tried commenting line 23 out too, but no change in behavior. Display drops out after 6secs.

Well, that really shouldn’t happen…
I will take another look.

Ok, I missed some places where the time is supposed to be reset.
Does it work better now?

Okay, maybe some progress, maybe not. I uploaded the new OS, filmed an example here: YouTube demonstration. In it, the screen doesn’t timeout (most of the time), but we’re back to it not displaying the font scr/pqf in between preset changes.

Here is a serial monitor of what’s happening (not sure if it’s better context). But it demonstrates it’s not double-calling idle (or other pqfs), but it’s back to thrice “File not found” issues. Where, I think last update it only had two of those messages.

So, I’m not sure what to think. Why is it only the font screen? Is the fact that idle.pqf is the same file name in both presets, so it just keeps playing, even though the folder changes? Why then would serial monitor show that it attempts to call font.pqf, but cannot?

Well, there is some progress at least.
Could you try adding this define to your config file:

#define PROFFIEOS_LOG_LEVEL 500

It won’t fix anything, but it will make the output from the serial monitor a lot more verbose, so maybe we can figure out what is going on.

I wasn’t able to use PasteBin due to size limit and the amount of extra data in serial monitor, so I’m attaching it via txt file. I also filmed simulaneously so that perhaps there’s side-by-side context. Probably unnecessary, but can’t hurt. Here’s the link to that: YouTube of Log Level
ProffieOS Log Level.txt (997.2 KB)


EDIT: here’s the config too (not much different than before)

Found one more bug. Hopefully this will fix the font pqf not playing.
I also added more debug printouts, so if there are still more issues, or if the font.pqf still doesn’t play, please dump the serial monitor contents again,.

Still no font pqf, except on the first cycle thru the presets, something happened again on Vader preset causing the screen to go dark. That of course allowed the Mace font to load, but I ignited before my 6sec timer of the font.scr and it blanked out on Mace as well. Meaning it didn’t get to load the pqf handling idle, on, and lock conditions. Otherwise, no time-out issues, but stil no Font.pqf being displayed unless an error occurs.

PS - I checked the SD card, and there is nothing different about the Vader set of display files from the other three similarly structured ones (Tano, Vader, BMF, L-Skywalker all use similarly named files). Osha, Ani3, and Battery presets have different set of SCR and PQF. Only mentioning, since I brought it up in that last video linked.

ProffieOS Log Level-round2.txt (761.1 KB)

Ok, I have another set of fixes for you to try.
These fixes focuses on making things happen in the right order, which I hope will make the font PQF files play properly.

That seems to have done the trick. I’m encountering one other issue, where sometimes the saber freezes, and sounds out a solid tone on the speaker. I can turn the power on and off to stop it, but it happened twice when I was going to show one thing that isn’t a bug, but may entice you to do what I’ve done. Here it is in a video demo.

Again, explained in the video, but I have my font.scr timeout at 6 seconds, because one or two of the font screens I created from videos are that long. However, if I ignite the saber while it’s still displaying the font.pqf, AND if I’m still using your idle.scr with the “vc.pqf” that has the built-in logic for idle/on/lock, then it doens’t display because it technically never loaded idle. It’s not a bug, but it helps that I’ve done some testing to separate out the various events, because it can load the separate on.scr, etc. Food for thought. I may reduce that font screen down to 3seconds, and go to the two specific fonts and change those to not have the same timing. But I was trying to set up my various screens files to be generic, and make it easy to modify for colors and characters.

But, success!! Perhaps…?

This is the “Squee of Death”, and it indicates that ProffieOS has crashed.
These are usually easy to find and fix with a debugger. But that means that either I have to reproduce the problem, or you have to get a debugger…

Copying idle.scr to on.scr fixes this problem, right?

I’m open to learning a new trick. How would I go about this? Or, if already explained, where can I read about how to do this?

I can test, but the answer will be yes. Knowing we’re almost at the finish line, it was always my plan to do the work I did on the blue cyrstal colors, to separate the other colors the same way. But I didn’t want to get too far down that amount of effort if it proved counterproductive.

Makes sense. In this case, the correct fix is to also start the animation from on.scr.