diff --git a/examples/companion_radio/ui-new/TrailScreen.h b/examples/companion_radio/ui-new/TrailScreen.h index da71430c..87a34f5e 100644 --- a/examples/companion_radio/ui-new/TrailScreen.h +++ b/examples/companion_radio/ui-new/TrailScreen.h @@ -167,17 +167,17 @@ private: void handleExport() { if (!Serial) { _task->showAlert("Connect USB first", 1200); return; } // The companion app multiplexes BLE + USB on the same frame protocol. - // When BLE is connected, USB-receive is ignored and we can safely push - // raw GPX bytes to USB. With BLE off the app would be on USB itself, - // so the dump would corrupt its incoming frames — refuse and tell the - // user how to make space. - if (!_task->hasConnection()) { - _task->showAlert("Connect BLE or disconnect app", 1500); - return; - } + // When BLE is connected, USB-receive is ignored and the dump can't + // collide. Without a BLE link the app might be on USB itself, in + // which case the raw GPX would land mid-frame and confuse it — warn + // the user but proceed (they may have no app attached at all). size_t n = _store->exportGpx(Serial); - char alert[24]; - snprintf(alert, sizeof(alert), "GPX %u B over USB", (unsigned)n); + char alert[28]; + if (_task->hasConnection()) { + snprintf(alert, sizeof(alert), "GPX %u B (USB)", (unsigned)n); + } else { + snprintf(alert, sizeof(alert), "GPX %u B - disc. app", (unsigned)n); + } _task->showAlert(alert, 1500); }