fix: harden firmware builds and runtime reliability
This commit is contained in:
1 parent
66c9e3f73b
commit
bd3a94bddb
71 files changed
+2102
-466
No files matched your search
@@ -34,7 +34,14 @@
|
||||
|
||||
namespace mesh {
|
||||
|
||||
#if defined(COMPANION_RADIO_FULL)
|
||||
// Full Companion owns its primary USB stream for framed traffic until saved
|
||||
// preferences are loaded. Starting disabled prevents early boot diagnostics
|
||||
// from corrupting that stream before single-TTY builds can enter terminal mode.
|
||||
static std::atomic<bool> usb_logging_enabled{false};
|
||||
#else
|
||||
static std::atomic<bool> usb_logging_enabled{true};
|
||||
#endif
|
||||
static std::atomic<bool> usb_logging_preference_known{false};
|
||||
|
||||
class NullUsbLoggingStream : public Stream {
|
||||
@@ -151,6 +158,7 @@ void beginUsbLoggingPort() {
|
||||
// A terminal opening or closing the diagnostics interface must never reboot
|
||||
// the node or put it into the ROM downloader.
|
||||
dedicated_usb_logging_port->enableReboot(false);
|
||||
dedicated_usb_logging_port->setTxTimeoutMs(0);
|
||||
dedicated_usb_logging_port->begin(115200);
|
||||
#elif defined(MESH_NRF52_DUAL_CDC_LOGGING)
|
||||
dedicated_usb_logging_port.begin(115200);
|
||||
|
||||
Reference in new issue
Block a user