@@ -67,7 +67,6 @@ const char *GNSS_LG290P::getRtcmLowDataRateString()
67
67
void GNSS_LG290P::begin ()
68
68
{
69
69
// During identifyBoard(), the GNSS UART and DR pins are set
70
- Serial.println (" LG begin" );
71
70
72
71
// The GNSS UART is already started. We can now pass it to the library.
73
72
if (serialGNSS == nullptr )
@@ -1184,6 +1183,12 @@ uint32_t GNSS_LG290P::getDataBaudRate()
1184
1183
// This is nicknamed the DATA port
1185
1184
dataUart = 1 ;
1186
1185
}
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
+ }
1187
1192
return (getBaudRate (dataUart));
1188
1193
}
1189
1194
@@ -1203,6 +1208,15 @@ bool GNSS_LG290P::setDataBaudRate(uint32_t baud)
1203
1208
return (setBaudRate (1 , baud));
1204
1209
}
1205
1210
}
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
+ }
1206
1220
else
1207
1221
{
1208
1222
// 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()
1228
1242
// UART2 of the LG290P is connected to SW4, which is connected to LoRa UART0
1229
1243
radioUart = 2 ;
1230
1244
}
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
+ }
1231
1251
return (getBaudRate (radioUart));
1232
1252
}
1233
1253
@@ -1255,6 +1275,12 @@ bool GNSS_LG290P::setRadioBaudRate(uint32_t baud)
1255
1275
// UART2 of the LG290P is connected to SW4, which is connected to LoRa UART0
1256
1276
radioUart = 2 ;
1257
1277
}
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
+ }
1258
1284
return (setBaudRate (radioUart, baud));
1259
1285
}
1260
1286
}
0 commit comments