refactor(companion): the app's links through upstream's MultiSerialInterface

- Bluetooth + USB (+ WiFi/Ethernet/UART per build) in one interface_manager,
  as upstream; frames go to every enabled link, USB is read while BT is
  connected. DUAL_SERIAL now means ENABLE_USB_INTERFACE.
- WiFi interface with upstream's wifi_* prefs and set/get wifi.* CLI.
- isClientConnected moved into ArduinoSerialInterface (DTR on nRF52 and
  ESP32 native CDC).
- UI uses isBluetoothEnabled/enableBluetooth/disableBluetooth; turning BT
  off leaves USB and the other links on.
- DualSerialInterface removed.
- Sim build gains DynamicConfigSerializer.cpp (broken since bd64c203).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-15 14:04:58 +02:00
co-authored by Claude Opus 5.5
parent bd64c203c7
commit f6c0a2f021
21 changed files with 345 additions and 309 deletions
@@ -314,7 +314,7 @@ bool UITask::quickPanelOpen() const { return qpanel::s_open; }
void UITask::quickPanelRefresh() {
using namespace qpanel;
if (!s_panel) return;
tileSet(T_BT, LV_SYMBOL_BLUETOOTH, hasConnection() ? "Connected" : "Bluetooth", isSerialEnabled());
tileSet(T_BT, LV_SYMBOL_BLUETOOTH, hasConnection() ? "Connected" : "Bluetooth", isBluetoothEnabled());
tileSet(T_WIFI, LV_SYMBOL_WIFI, lvport::netRadio() == lvport::NET_UP ? "Online" : "WiFi", lvport::wifiAllowed());
int32_t lat, lon;
const bool gps = _core->gpsEnabled();
@@ -357,7 +357,7 @@ void UITask::quickPanelTile(int t, bool hold) {
}
// The tile shows what changed: no toast saying it again.
switch (t) {
case T_BT: setBluetooth(!isSerialEnabled()); break;
case T_BT: setBluetooth(!isBluetoothEnabled()); break;
case T_WIFI: wifiSetAllowed(!lvport::wifiAllowed()); break;
case T_GPS: if (_core->gpsAvailable()) setGps(!_core->gpsEnabled()); break;
case T_SOUND: