Skip to content

Commit 9273d83

Browse files
committed
Ensure Torch COM3 only ever runs at 115200 baud
1 parent 29113dd commit 9273d83

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Firmware/RTK_Everywhere/GNSS_UM980.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,14 @@ bool GNSS_UM980::configureOnce()
252252
response &= _um980->setPortBaudrate("COM2", 115200); // COM2 is connected to the IMU
253253
response &= _um980->setPortBaudrate("COM3", 115200); // COM3 is connected to the switch, then ESP32
254254

255-
// For now, let's not change the baud rate of the interface. We'll be using the default 115200 for now.
256-
response &= setBaudRateCOM3(settings.dataPortBaud); // COM3 is connected to ESP UART2
255+
// TODO: delete Paul's little rant, once you've read it
256+
// Why would you change the COM3 baud rate here? It's connected to the ESP32 serialGNSS. You can't
257+
// change the COM3 baud rate without changing the serialGNSS baud to match... I think this only works
258+
// because there is a "settings.dataPortBaud = 115200; // Override settings. Use UM980 at 115200bps."
259+
// in beginBoard. It causes badness when profile defaults are applied via web config, because that
260+
// sets settings.dataPortBaud back to its default of 230400!
261+
// // For now, let's not change the baud rate of the interface. We'll be using the default 115200 for now.
262+
// response &= setBaudRateCOM3(settings.dataPortBaud); // COM3 is connected to ESP UART2
257263

258264
// Enable PPS signal with a width of 200ms, and a period of 1 second
259265
response &= _um980->enablePPS(200000, 1000); // widthMicroseconds, periodMilliseconds

Firmware/RTK_Everywhere/menuMessages.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,13 @@ void checkGNSSArrayDefaults()
655655
#ifdef COMPILE_UM980
656656
else if (present.gnss_um980)
657657
{
658+
if (settings.dataPortBaud != 115200)
659+
{
660+
// Belt and suspenders... Let's make really sure COM3 only ever runs at 115200
661+
defaultsApplied = true;
662+
settings.dataPortBaud = 115200;
663+
}
664+
658665
if (settings.dynamicModel == 254)
659666
{
660667
defaultsApplied = true;

0 commit comments

Comments
 (0)