Public Access
Add HA dropdowns, off image, flip fixes and refresh effects
Home Assistant: remove the Clock switch (its entity is deleted on connect), add an IP sensor and Mode / Off image dropdowns whose options follow the saved bitmaps. Remove the built-in "Nintendo border" bitmap. Off image: a bitmap (or blank) left on the dots when the display switches off. Nano: pause after each flip pulse and repeat pulses for changed dots, both stored in EEPROM (G/N commands). Refresh effects (E command): instant, sparkle, wipe, rain, from the middle out, diagonal, spiral, flip all then reveal, push and random, optionally only for small changes. Effects run in steps from loop() so serial input keeps flowing. Web UI: flip settings, refresh effect and test patterns under Settings; the System tab shows why the ESP32 last restarted. Settings records from versions 1 and 2 are migrated. Firmware 2.3.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4a5f6a8b5d
commit
1d3b084de1
42 files changed
+1631
-230
No files matched your search
@@ -102,6 +102,18 @@ void CommandParser::_runLine()
|
||||
// Complete bitmap headers are handled in feed()
|
||||
_error(F("Incomplete bitmap header"));
|
||||
break;
|
||||
case 'e':
|
||||
case 'E':
|
||||
_effect();
|
||||
break;
|
||||
case 'g':
|
||||
case 'G':
|
||||
_gap();
|
||||
break;
|
||||
case 'n':
|
||||
case 'N':
|
||||
_pulses();
|
||||
break;
|
||||
case 'd':
|
||||
case 'D':
|
||||
_display.display();
|
||||
@@ -256,3 +268,48 @@ void CommandParser::_timing()
|
||||
_display.setTiming(t);
|
||||
saveFlipTime(t);
|
||||
}
|
||||
|
||||
// Gttt (ttt = decimal pause after each pulse in us, 0-5000), stored in EEPROM
|
||||
void CommandParser::_gap()
|
||||
{
|
||||
long t = atol(_line + 1);
|
||||
if (_line_len < 2 || t < 0 || t > FLIP_GAP_MAX)
|
||||
{
|
||||
_error(F("Flip gap out of range (0-5000 us)"));
|
||||
return;
|
||||
}
|
||||
_display.setGap(t);
|
||||
saveFlipGap(t);
|
||||
}
|
||||
|
||||
// Nn (n = pulses for each changed dot, 1-3), stored in EEPROM
|
||||
void CommandParser::_pulses()
|
||||
{
|
||||
long n = atol(_line + 1);
|
||||
if (n < 1 || n > PULSES_MAX)
|
||||
{
|
||||
_error(F("Pulses out of range (1-3)"));
|
||||
return;
|
||||
}
|
||||
_display.setPulses(n);
|
||||
savePulses(n);
|
||||
}
|
||||
|
||||
// Ee,ttt[,f] (e = effect number, ttt = decimal duration in ms, 100-10000, f = flags,
|
||||
// EFFECT_FLAG_... in dot_sequence.h, default 0), stored in EEPROM
|
||||
void CommandParser::_effect()
|
||||
{
|
||||
const char *comma = strchr(_line + 1, ',');
|
||||
const char *comma2 = comma ? strchr(comma + 1, ',') : nullptr;
|
||||
long effect = atol(_line + 1);
|
||||
long t = comma ? atol(comma + 1) : 0;
|
||||
long flags = comma2 ? atol(comma2 + 1) : 0;
|
||||
if (_line_len < 2 || !comma || effect < 0 || effect >= EFFECT_COUNT || t < EFFECT_TIME_MIN ||
|
||||
t > EFFECT_TIME_MAX || flags < 0 || flags > EFFECT_FLAGS_MAX)
|
||||
{
|
||||
_error(F("Invalid effect (Ee,ms,flags: e 0-9, 100-10000 ms, flags 0-1)"));
|
||||
return;
|
||||
}
|
||||
_display.setEffect(effect, t, flags);
|
||||
saveEffect(effect, t, flags);
|
||||
}
|
||||
Reference in new issue
Block a user