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
@@ -32,9 +32,29 @@ struct HomeAssistantSettings
|
||||
char password[64] = "";
|
||||
};
|
||||
|
||||
// How the Nano drives the dots (besides the flip time). Sent to the Nano, which keeps
|
||||
// them in its EEPROM. The defaults match the Nano's (src/nano/config.h).
|
||||
const uint8_t DRIVE_EFFECT_INSTANT = 0; // numbers: RefreshEffect in lib/BROSE9323/dot_sequence.h
|
||||
const uint8_t DRIVE_EFFECT_PUSH = 8;
|
||||
const uint8_t DRIVE_EFFECT_RANDOM = 9;
|
||||
const uint8_t DRIVE_EFFECT_COUNT = 10;
|
||||
// Pushing flips many dots per column step, so it can take much longer than effect_time
|
||||
const uint32_t DRIVE_PUSH_EXTRA_TIME = 20000;
|
||||
|
||||
struct DriveSettings
|
||||
{
|
||||
uint16_t flip_gap = 200; // pause after each pulse in us (0-5000)
|
||||
uint8_t pulses = 2; // pulses for each changed dot (1-3)
|
||||
uint8_t effect = DRIVE_EFFECT_INSTANT;
|
||||
uint16_t effect_time = 1500; // ms (100-10000)
|
||||
bool effect_small_only = false; // big changes (a new page) appear instantly
|
||||
};
|
||||
|
||||
// What is shown during the day: "clock" or the name of a bitmap
|
||||
const int PAGE_NAME_SIZE = 25;
|
||||
#define PAGE_CLOCK "clock"
|
||||
// What is left on the dots when the display switches off: empty = blank, or a bitmap name
|
||||
#define OFF_PAGE_BLANK ""
|
||||
|
||||
struct Settings
|
||||
{
|
||||
@@ -44,8 +64,16 @@ struct Settings
|
||||
HomeAssistantSettings home_assistant;
|
||||
uint16_t flip_time = 225; // flip pulse length in us, sent to the Nano
|
||||
bool status_led = true;
|
||||
// Added in settings version 2: keep it last, the fields before it are read from
|
||||
// version 1 records (system/settings_store.cpp)
|
||||
char off_page[PAGE_NAME_SIZE] = OFF_PAGE_BLANK;
|
||||
// Added in version 3
|
||||
DriveSettings drive;
|
||||
};
|
||||
|
||||
// How long a new frame can take to appear on the dots in ms (0 when instant)
|
||||
uint32_t effectTime(const DriveSettings &drive);
|
||||
|
||||
const uint16_t MINUTES_PER_DAY = 24 * 60;
|
||||
const uint16_t SETTINGS_FLIP_TIME_MIN = 50;
|
||||
const uint16_t SETTINGS_FLIP_TIME_MAX = 2000;
|
||||
|
||||
Reference in new issue
Block a user