@@ -67,7 +67,6 @@ const char *GNSS_LG290P::getRtcmLowDataRateString()
6767void GNSS_LG290P::begin ()
6868{
6969 // During identifyBoard(), the GNSS UART and DR pins are set
70- Serial.println (" LG begin" );
7170
7271 // The GNSS UART is already started. We can now pass it to the library.
7372 if (serialGNSS == nullptr )
@@ -1184,6 +1183,12 @@ uint32_t GNSS_LG290P::getDataBaudRate()
11841183 // This is nicknamed the DATA port
11851184 dataUart = 1 ;
11861185 }
1186+ else if (productVariant == RTK_TORCH_X2)
1187+ {
1188+ // UART3 of the LG290P is connected to USB CH342 (Port A)
1189+ // This is nicknamed the DATA port
1190+ dataUart = 3 ;
1191+ }
11871192 return (getBaudRate (dataUart));
11881193}
11891194
@@ -1203,6 +1208,15 @@ bool GNSS_LG290P::setDataBaudRate(uint32_t baud)
12031208 return (setBaudRate (1 , baud));
12041209 }
12051210 }
1211+ else if (productVariant == RTK_TORCH_X2)
1212+ {
1213+ if (getDataBaudRate () != baud)
1214+ {
1215+ // UART3 of the LG290P is connected to USB CH342 (Port A)
1216+ // This is nicknamed the DATA port
1217+ return (setBaudRate (3 , baud));
1218+ }
1219+ }
12061220 else
12071221 {
12081222 // On products that don't have a DATA port (Flex), act as if we have set the baud successfully
@@ -1228,6 +1242,12 @@ uint32_t GNSS_LG290P::getRadioBaudRate()
12281242 // UART2 of the LG290P is connected to SW4, which is connected to LoRa UART0
12291243 radioUart = 2 ;
12301244 }
1245+ else if (productVariant == RTK_TORCH_X2)
1246+ {
1247+ // UART1 of the LG290P is connected to SW, which is connected to ESP32 UART0
1248+ // Not really used at this time but available for configuration
1249+ radioUart = 1 ;
1250+ }
12311251 return (getBaudRate (radioUart));
12321252}
12331253
@@ -1255,6 +1275,12 @@ bool GNSS_LG290P::setRadioBaudRate(uint32_t baud)
12551275 // UART2 of the LG290P is connected to SW4, which is connected to LoRa UART0
12561276 radioUart = 2 ;
12571277 }
1278+ else if (productVariant == RTK_TORCH_X2)
1279+ {
1280+ // UART1 of the LG290P is connected to SW, which is connected to ESP32 UART0
1281+ // Not really used at this time but available for configuration
1282+ radioUart = 1 ;
1283+ }
12581284 return (setBaudRate (radioUart, baud));
12591285 }
12601286 }
0 commit comments