fix: settings and lists lost to a restart mid-save on ESP32, LR1121 boards, repeater/room sims

- A restart between commitTempFile()'s remove and rename left only the .tmp;
  loads now recover it (prefs, contacts, channels, scopes).
- CustomLR1121Wrapper lacked readLiveRSSI/readLiveSNR: LR1121 boards didn't
  compile.
- The repeater and room server sims gain DynamicConfigSerializer.cpp and
  CommonRadioPrefs.cpp (broken since the v1.18 merge).
- Comments still describing the removed DualSerialInterface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-15 14:42:04 +02:00
co-authored by Claude Opus 5.5
parent 8c20914689
commit cdf979dcca
7 changed files with 28 additions and 11 deletions
+4 -5
View File
@@ -16,14 +16,13 @@ public:
virtual bool isConnected() const = 0;
virtual void loop() {};
// Returns true when a BLE companion app is connected. Default delegates to
// isConnected(); override in dual-interface wrappers that always report
// isConnected()=true but still need to distinguish BLE from USB state.
// isConnected(); MultiSerialInterface asks its Bluetooth interfaces only.
virtual bool isBLEConnected() const { return isConnected(); }
// True when a companion app is actually connected over *any* transport
// (BLE bonded or a host holding the USB-CDC port open). Distinct from
// isConnected(), which a dual interface hardcodes true as a send fallback.
// Used for app-connected UI (Auto buzzer mute, message-wake). Default =
// isConnected() so single-transport interfaces are unchanged.
// isConnected(), which a USB serial port reports true even with nothing on
// the other end (it can't tell). Used for app-connected UI (Auto buzzer
// mute, message-wake). Default = isConnected().
virtual bool isClientConnected() const { return isConnected(); }
// For a loop that sleeps between passes: frames waiting to be read or sent.
@@ -41,6 +41,8 @@ public:
float getLastRSSI() const override { return ((CustomLR1121 *)_radio)->getRSSI(); }
float getLastSNR() const override { return ((CustomLR1121 *)_radio)->getSNR(); }
float readLiveRSSI() const override { return ((CustomLR1121 *)_radio)->getRSSI(); }
float readLiveSNR() const override { return ((CustomLR1121 *)_radio)->getSNR(); }
uint8_t getSpreadingFactor() const override { return ((CustomLR1121 *)_radio)->getSpreadingFactor(); }