File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -265,8 +265,8 @@ bool GNSS_LG290P::configureOnce()
265265 {
266266 response &= setDataBaudRate (settings.dataPortBaud ); // If available, set baud of DATA port
267267
268- // This is redundant because to get this far, the comm interface must already be working
269- // response &= setCommBaudrate(115200 * 4); // Set baud for main comm channel
268+ // The following setCommBaudrate() is redundant because to get this far, the comm interface must already be
269+ // working response &= setCommBaudrate(115200 * 4); // Set baud for main comm channel
270270
271271 response &= setRadioBaudRate (settings.radioPortBaud ); // If available, set baud of RADIO port
272272
@@ -1246,19 +1246,23 @@ bool GNSS_LG290P::setDataBaudRate(uint32_t baud)
12461246{
12471247 if (online.gnss )
12481248 {
1249- if (productVariant == RTK_POSTCARD )
1249+ if (getDataBaudRate () == baud )
12501250 {
1251- if (getDataBaudRate () != baud)
1251+ return (true ); // Baud is set!
1252+ }
1253+ else
1254+ {
1255+ if (productVariant == RTK_POSTCARD)
12521256 {
12531257 // UART1 of the LG290P is connected to USB CH342 (Port B)
12541258 // This is nicknamed the DATA port
12551259 return (setBaudRate (1 , baud));
12561260 }
1257- }
1258- else
1259- {
1260- // On products that don't have a DATA port (Flex), act as if we have set the baud successfully
1261- return ( true );
1261+ else
1262+ {
1263+ // On products that don't have a DATA port (Flex), act as if we have set the baud successfully
1264+ return ( true );
1265+ }
12621266 }
12631267 }
12641268 return (false );
You can’t perform that action at this time.
0 commit comments