Public Access
Fix shifted pictures: non-blocking Nano drawing, frame check, refresh settings
The Nano's periodic full redraw blocked for ~0.8 s. A frame that arrived meanwhile overflowed its 64-byte serial buffer; lost bytes in a bitmap shift the rest of the image (picture moved up), and diff frames never repaired it. - Nano: all drawing (frames, effects, the dot refresh) runs from update() in ~1 ms slices; the refresh pauses while a frame is received or shown - New commands: C (reply with the image checksum) and I (refresh minutes, EEPROM) - ESP32: NanoMonitor asks for the checksum after frames and sends the whole image again on a mismatch, missing answer or Nano restart; counts ERR replies. Periodic whole-image resync. - Settings: "Dot refresh" and "Image resync" intervals (settings v5, v4 records are migrated) - System tab: loop timing, free memory, frame check counts - test_driver: the real driver against a simulated panel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
58a7cb03c2
commit
090c2bf8ae
45 files changed
+1265
-157
No files matched your search
+5
-2
@@ -25,6 +25,8 @@ BROSE9323 display(DISPLAY_WIDTH, DISPLAY_HEIGHT, PANEL_WIDTH);
|
||||
FlipdotFrames frames(display, pageResources);
|
||||
StatusScreen status(display, nano);
|
||||
DisplayController controller(nano, frames);
|
||||
LoopStats loopStats;
|
||||
NanoMonitor nanoMonitor(nano, display);
|
||||
|
||||
static Settings settings;
|
||||
static bool restart_pending = false;
|
||||
@@ -87,7 +89,7 @@ static void apply()
|
||||
{
|
||||
controller.setSettings(settings.schedule, settings.clock);
|
||||
controller.setEffectTime(effectTime(settings.drive));
|
||||
status.setDrive(settings.flip_time, settings.drive);
|
||||
status.setDrive(settings.flip_time, settings.drive, settings.refresh.dots);
|
||||
frames.setDrive(settings.flip_time, settings.drive);
|
||||
haApiSetSettings(settings.home_assistant);
|
||||
applyOffPage();
|
||||
@@ -137,7 +139,8 @@ const char *appSaveSettings(const Settings &new_settings, bool &restart_needed)
|
||||
const DriveSettings &a = settings.drive, &b = new_settings.drive;
|
||||
bool drive_changed = settings.flip_time != new_settings.flip_time || a.flip_gap != b.flip_gap ||
|
||||
a.pulses != b.pulses || a.effect != b.effect || a.effect_time != b.effect_time ||
|
||||
a.effect_small_only != b.effect_small_only;
|
||||
a.effect_small_only != b.effect_small_only ||
|
||||
settings.refresh.dots != new_settings.refresh.dots;
|
||||
settings = new_settings;
|
||||
saveSettings(settings);
|
||||
selector.setChosen(settings.page);
|
||||
|
||||
Reference in new issue
Block a user