Public Access
Send only the changed dots of a frame to the Nano
Frames were sent as F0 plus one s command per yellow dot (thousands of characters). During scrolling that overran the Nano's serial buffer, and half-received frames redrew the whole screen. showBitmap() now sends two B commands over the changed rectangle (dots off, dots on), or one B command for a full frame, and the pacing counts the characters sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89001ddbc6
commit
47ef65ee7d
8 files changed
+262
-25
No files matched your search
@@ -12,9 +12,9 @@ class FlipdotFrames : public Frames
|
||||
public:
|
||||
FlipdotFrames(BROSE9323 &display, PageResources &resources);
|
||||
|
||||
// The page set with setDynamicPage(), drawn for this time. Not sent when it looks the
|
||||
// same as the last frame (unless redraw). Moving pages are sent without the refresh
|
||||
// effect, and not faster than the Nano can flip the dots.
|
||||
// The page set with setDynamicPage(), drawn for this time. Only the changed dots are
|
||||
// sent (nothing when it looks the same), unless redraw. Moving pages are sent without
|
||||
// the refresh effect, and not faster than the Nano can receive and flip them.
|
||||
uint32_t dynamicPage(const LocalTime &time, uint32_t now, bool redraw) override;
|
||||
// "No WiFi" with the time below it
|
||||
void noWifi(int hour, int minute) override;
|
||||
@@ -37,12 +37,11 @@ private:
|
||||
BROSE9323 &_display;
|
||||
PageResources &_resources;
|
||||
DynamicPage _dynamic;
|
||||
uint8_t _last_dynamic[BITMAP_BYTES] = {};
|
||||
uint32_t _dot_us = 1000; // per changed dot: pulses x (flip time + gap)
|
||||
uint8_t _page[BITMAP_BYTES] = {};
|
||||
uint8_t _live[BITMAP_BYTES] = {};
|
||||
uint8_t _off[BITMAP_BYTES] = {}; // all zero: blank
|
||||
|
||||
void _drawFullScreen(const uint8_t *bitmap, bool instant = false);
|
||||
uint32_t _flipMs(const uint8_t *bitmap, bool all) const;
|
||||
void _drawFullScreen(const uint8_t *bitmap);
|
||||
uint32_t _show(const uint8_t *bitmap, bool changes_only, bool instant);
|
||||
};
|
||||
Reference in new issue
Block a user