mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
refactor(companion): shared shutdown steps, SD channel key by secret, fetch race, small UI fixes
- UITaskBase holds what both UIs' shutdown() and low-battery check share: the saves before the goodbye sound, the power-down (GPS through its provider) and the battery EMA and threshold. - L2 SD archive: a channel's file is keyed by its secret only, so renaming keeps the history; old files are renamed once at boot. - L2 fetch: abandoning a request and the task finishing it are one critical section (it could stay DONE for good); TileCache gets the read-side barrier. - Text from a repeater or sensor no longer rings on the device (nothing to open); a settings switch reads any non-zero value as on; the message toast never cuts a letter in half; ui-new's GPS helpers ask UiCore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,9 @@ public:
|
||||
struct Done { int z; int32_t x, y; TileProvider* src; bool overlay_missed; };
|
||||
bool poll(Done& done) {
|
||||
if (_job_state != JOB_DONE) return false;
|
||||
#if defined(ESP32)
|
||||
__sync_synchronize(); // pairs with runJob()'s: the state before the results it covers
|
||||
#endif
|
||||
done = { _job.z, _job.x, _job.y, _job.src, _job.overlay_missed };
|
||||
bool keep = !_job_stale;
|
||||
if (keep && !_job.present) { // remember the miss without holding a buffer slot
|
||||
|
||||
Reference in New Issue
Block a user