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
@@ -15,10 +15,10 @@ struct BuiltinBitmap
|
||||
|
||||
static const BuiltinBitmap BUILTIN[] = {
|
||||
{"Nintendo", nintendo_bitmap_Nintendo_new},
|
||||
{"Nintendo border", nintendo_bitmap_nintendo_border},
|
||||
};
|
||||
|
||||
static bool mounted = false;
|
||||
static uint32_t revision = 0;
|
||||
|
||||
static const BuiltinBitmap *builtin(const char *name)
|
||||
{
|
||||
@@ -77,6 +77,11 @@ std::vector<BitmapInfo> listBitmaps()
|
||||
return list;
|
||||
}
|
||||
|
||||
uint32_t bitmapListRevision()
|
||||
{
|
||||
return revision;
|
||||
}
|
||||
|
||||
bool bitmapExists(const char *name)
|
||||
{
|
||||
if (builtin(name))
|
||||
@@ -118,6 +123,7 @@ const char *saveBitmap(const char *name, const uint8_t *bitmap)
|
||||
return "Could not write the file";
|
||||
bool ok = file.write(bitmap, BITMAP_BYTES) == (size_t)BITMAP_BYTES;
|
||||
file.close();
|
||||
revision++;
|
||||
return ok ? nullptr : "Storage full";
|
||||
}
|
||||
|
||||
@@ -127,5 +133,8 @@ const char *deleteBitmap(const char *name)
|
||||
return "Built-in bitmaps can't be deleted";
|
||||
if (!mounted || !validBitmapName(name) || !LittleFS.exists(path(name)))
|
||||
return "Bitmap not found";
|
||||
return LittleFS.remove(path(name)) ? nullptr : "Could not delete the file";
|
||||
if (!LittleFS.remove(path(name)))
|
||||
return "Could not delete the file";
|
||||
revision++;
|
||||
return nullptr;
|
||||
}
|
||||
Reference in new issue
Block a user