Public Access
Fix dense images on the Nano and the off image in slow mode
- Nano: B data is drawn fast enough for the serial line. A hex digit arrives every 87 us; with a division and four drawPixel() calls per digit a lit digit took about 105 us, so dense frames (all yellow, the panda bitmap) overflowed the 64 byte receive buffer: frames not shown or wrong, "Line too long", frame check repairs that failed the same way. Now the parser counts columns and rows and BROSE9323::drawDots() sets the 4 dots (about 20 us). - ESP32: Power off and the start of the night draw the off image also when slow mode had the power off already (it powers on for it, once) - Tests: drawDots() against drawPixel(), off image in slow mode - Version 2.19.3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41af2944bc
commit
7a28e34380
13 files changed
+130
-17
No files matched your search
@@ -103,8 +103,9 @@ void DisplayController::update(uint32_t now, bool time_valid, const LocalTime &t
|
||||
|
||||
if (!_power_enabled)
|
||||
{
|
||||
if (_power.isOn())
|
||||
if (_power.isOn() || _off_needed)
|
||||
{
|
||||
_ensureOn();
|
||||
_showOnce(Screen::Off);
|
||||
_off_timer.request(now, CLEAR_BEFORE_OFF_TIME + _effect_time);
|
||||
}
|
||||
@@ -129,8 +130,9 @@ void DisplayController::update(uint32_t now, bool time_valid, const LocalTime &t
|
||||
case ScheduleMode::Night:
|
||||
_slow_last = -1; // the morning starts with an update
|
||||
_slow_keep = false;
|
||||
if (_power.isOn())
|
||||
if (_power.isOn() || _off_needed)
|
||||
{
|
||||
_ensureOn();
|
||||
_showOnce(Screen::Off);
|
||||
_off_timer.request(now, POWER_OFF_DELAY);
|
||||
}
|
||||
@@ -209,6 +211,7 @@ void DisplayController::_showDynamic(uint32_t now, const LocalTime &time, bool n
|
||||
_dynamic_due = now + wait;
|
||||
}
|
||||
_screen = screen;
|
||||
_off_needed = true;
|
||||
_shown_hour = time.hour;
|
||||
_shown_minute = time.minute;
|
||||
_shown_revision = _content_revision;
|
||||
@@ -232,5 +235,6 @@ void DisplayController::_showOnce(Screen screen)
|
||||
break;
|
||||
}
|
||||
_screen = screen;
|
||||
_off_needed = screen != Screen::Off;
|
||||
_shown_revision = _content_revision;
|
||||
}
|
||||
@@ -109,6 +109,9 @@ private:
|
||||
bool _power_enabled = true;
|
||||
|
||||
Screen _screen = Screen::Unknown;
|
||||
// The dots show a frame other than the off screen, also while the power is off (slow
|
||||
// mode): Power off and night power on to draw the off screen
|
||||
bool _off_needed = false;
|
||||
int _shown_hour = -1;
|
||||
int _shown_minute = -1;
|
||||
uint32_t _dynamic_due = 0; // millis() when a moving dynamic page is drawn again
|
||||
|
||||
Reference in new issue
Block a user