lot of small fixes

- adds tag serial debug in webflasher and power up/down buttons
- fixes bug where esp32-s3 connected via usb cdc slows down when no terminal connection is present
- fix: ghost tags reporting a different channel id than the AP are now ignored
- webflasher now ramps up/down power to prevent spikes
- bugfix: C6 doesn't get reset anoymore by the watchdog during flashing
- bugfix: C6 could go in flash mode unintended
- a failed connection during swd write blocks is now reported back instead of silently ignored
- added 4 areas of Sweden to day ahead price content
- new context menu option 'Delete all inactive tags' (only when right clicking on an inactive tag).
- adjusted some timings
This commit is contained in:
Nic Limper
2024-02-23 17:08:52 +01:00
parent 65558360ef
commit ebd6b5289c
19 changed files with 210 additions and 68 deletions

View File

@@ -371,6 +371,17 @@ void init_web() {
wsSendTaginfo(mac, SYNC_DELETE);
deleteRecord(mac);
}
if (strcmp(cmdValue, "purge") == 0) {
time_t now;
time(&now);
for (int c = tagDB.size() - 1; c >= 0; --c) {
tagRecord *tag = tagDB.at(c);
if (tag->expectedNextCheckin == 3216153600 || tag->lastseen < now - 24 * 3600 || now > tag->expectedNextCheckin + 600) {
wsSendTaginfo(tag->mac, SYNC_DELETE);
deleteRecord(tag->mac);
}
}
}
if (strcmp(cmdValue, "clear") == 0) {
clearPending(taginfo);
while (dequeueItem(mac)) {
@@ -493,10 +504,11 @@ void init_web() {
#else
response->print("\"hasFlasher\": \"0\", ");
#endif
response->print("\"apstate\": \"" + String(apInfo.state) + "\", ");
response->print("\"apstate\": \"" + String(apInfo.state) + "\"");
File configFile = contentFS->open("/current/apconfig.json", "r");
if (configFile) {
response->print(", ");
configFile.seek(1);
const size_t bufferSize = 64;
uint8_t buffer[bufferSize];