Skip to content

Commit 4066595

Browse files
committed
Add enableNmeaOnRadio - resolves #604
1 parent 0562378 commit 4066595

File tree

7 files changed

+41
-5
lines changed

7 files changed

+41
-5
lines changed

Firmware/RTK_Everywhere/AP-Config/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,16 @@
14711471
<span class="icon-info-circle text-primary ms-2"></span>
14721472
</span>
14731473
</div>
1474+
1475+
<div class="form-check mt-3">
1476+
<label class="form-check-label" for="enableNmeaOnRadio">Enable NMEA output on
1477+
Radio</label>
1478+
<input class="form-check-input" type="checkbox" value="" id="enableNmeaOnRadio">
1479+
<span class="tt" data-bs-placement="right" id="enableNmeaOnRadioInfoText"
1480+
title="Enable NMEA output on external radio. Default: True">
1481+
<span class="icon-info-circle text-primary ms-2"></span>
1482+
</span>
1483+
</div>
14741484
</div>
14751485
</div>
14761486

Firmware/RTK_Everywhere/AP-Config/src/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ function parseIncoming(msg) {
121121
show("useLocalizedDistributionCheckbox");
122122
show("useEnableExtCorrRadio");
123123
show("extCorrRadioSPARTNSourceDropdown");
124+
hide("enableNmeaOnRadio");
124125
hide("shutdownNoChargeTimeoutMinutesCheckboxDetail");
125126

126127
hide("constellationNavic"); //Not supported on ZED
@@ -151,6 +152,7 @@ function parseIncoming(msg) {
151152
show("useLocalizedDistributionCheckbox");
152153
show("useEnableExtCorrRadio");
153154
show("extCorrRadioSPARTNSourceDropdown");
155+
hide("enableNmeaOnRadio");
154156

155157
hide("constellationNavic"); //Not supported on ZED
156158
}
@@ -172,6 +174,7 @@ function parseIncoming(msg) {
172174
hide("useLocalizedDistributionCheckbox");
173175
show("useEnableExtCorrRadio");
174176
hide("extCorrRadioSPARTNSourceDropdown");
177+
show("enableNmeaOnRadio");
175178

176179
select = ge("dynamicModel");
177180
let newOption = new Option('Static', '0');
@@ -256,7 +259,8 @@ function parseIncoming(msg) {
256259
show("surveyInSettings");
257260
show("useLocalizedDistributionCheckbox");
258261
show("useEnableExtCorrRadio");
259-
show("extCorrRadioSPARTNSourceDropdown");
262+
hide("extCorrRadioSPARTNSourceDropdown");
263+
show("enableNmeaOnRadio");
260264

261265
hide("constellationSbas"); //Not supported on LG290P
262266
show("constellationNavic");

Firmware/RTK_Everywhere/GNSS_LG290P.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,16 +628,21 @@ bool GNSS_LG290P::enableNMEA()
628628
// Check if this NMEA message is supported by the current LG290P firmware
629629
if (lg290pFirmwareVersion >= lgMessagesNMEA[messageNumber].firmwareVersionSupported)
630630
{
631+
// Disable NMEA output on UART3 RADIO
632+
int msgRate = settings.lg290pMessageRatesNMEA[messageNumber];
633+
if ((portNumber == 3) && (settings.enableNmeaOnRadio == false))
634+
msgRate = 0;
635+
631636
// If firmware is 4 or higher, use setMessageRateOnPort, otherwise setMessageRate
632637
if (lg290pFirmwareVersion >= 4)
633638
// Enable this message, at this rate, on this port
634639
response &=
635640
_lg290p->setMessageRateOnPort(lgMessagesNMEA[messageNumber].msgTextName,
636-
settings.lg290pMessageRatesNMEA[messageNumber], portNumber);
641+
msgRate, portNumber);
637642
else
638643
// Enable this message, at this rate
639644
response &= _lg290p->setMessageRate(lgMessagesNMEA[messageNumber].msgTextName,
640-
settings.lg290pMessageRatesNMEA[messageNumber]);
645+
msgRate);
641646
if (response == false && settings.debugGnss)
642647
systemPrintf("Enable NMEA failed at messageNumber %d %s.\r\n", messageNumber,
643648
lgMessagesNMEA[messageNumber].msgTextName);

Firmware/RTK_Everywhere/GNSS_Mosaic.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,11 @@ bool GNSS_MOSAIC::enableNMEA()
853853
String(mosaicMsgRates[settings.mosaicStreamIntervalsNMEA[stream]].name) + "\n\r");
854854
response &= sendWithResponse(setting, "NMEAOutput");
855855

856-
setting = String("sno,Stream" + String(stream + MOSAIC_NUM_NMEA_STREAMS + 1) + ",COM2," + streams[stream] +
857-
"," + String(mosaicMsgRates[settings.mosaicStreamIntervalsNMEA[stream]].name) + "\n\r");
856+
if (settings.enableNmeaOnRadio)
857+
setting = String("sno,Stream" + String(stream + MOSAIC_NUM_NMEA_STREAMS + 1) + ",COM2," + streams[stream] +
858+
"," + String(mosaicMsgRates[settings.mosaicStreamIntervalsNMEA[stream]].name) + "\n\r");
859+
else
860+
setting = String("sno,Stream" + String(stream + MOSAIC_NUM_NMEA_STREAMS + 1) + ",COM2,none,off\n\r");
858861
response &= sendWithResponse(setting, "NMEAOutput");
859862

860863
if (settings.enableGnssToUsbSerial)

Firmware/RTK_Everywhere/menuPorts.ino

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ void menuPortsNoMux()
7979
{
8080
systemPrintf("4) Toggle use of external corrections radio on UART3: %s\r\n",
8181
settings.enableExtCorrRadio ? "Enabled" : "Disabled");
82+
systemPrintf("5) NMEA output on radio UART3: %s\r\n",
83+
settings.enableNmeaOnRadio ? "Enabled" : "Disabled");
8284
}
8385

8486
systemPrintln("x) Exit");
@@ -140,6 +142,10 @@ void menuPortsNoMux()
140142
// Toggle the SPARTN source for the external corrections radio
141143
settings.extCorrRadioSPARTNSource ^= 1;
142144
}
145+
else if ((incoming == 5) && (present.gnss_lg290p))
146+
{
147+
settings.enableNmeaOnRadio ^= 1;
148+
}
143149
else if (incoming == 'x')
144150
break;
145151
else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
@@ -201,6 +207,8 @@ void menuPortsMultiplexed()
201207
settings.enableExtCorrRadio ? "Enabled" : "Disabled");
202208
systemPrintf("5) Output GNSS data to USB1 serial: %s\r\n",
203209
settings.enableGnssToUsbSerial ? "Enabled" : "Disabled");
210+
systemPrintf("6) NMEA output on radio COM2: %s\r\n",
211+
settings.enableNmeaOnRadio ? "Enabled" : "Disabled");
204212
}
205213

206214
systemPrintln("x) Exit");
@@ -283,6 +291,10 @@ void menuPortsMultiplexed()
283291
{
284292
settings.enableGnssToUsbSerial ^= 1;
285293
}
294+
else if ((incoming == 6) && (present.gnss_mosaicX5))
295+
{
296+
settings.enableNmeaOnRadio ^= 1;
297+
}
286298
else if (incoming == 'x')
287299
break;
288300
else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)

Firmware/RTK_Everywhere/settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ struct Settings
904904
uint32_t radioPortBaud = 57600; // Default to 57600bps to support connection to SiK1000 type telemetry radios
905905
int16_t serialTimeoutGNSS = 1; // In ms - used during serialGNSS->begin. Number of ms to pass of no data before
906906
// hardware serial reports data available.
907+
bool enableNmeaOnRadio = true; // Postcard (LG290P) and Facet mosaic only
907908

908909
// Setup Button
909910
bool disableSetupButton = false; // By default, allow setup through the overlay button(s)
@@ -1517,6 +1518,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
15171518
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, _bool, 0, & settings.enableGnssToUsbSerial, "enableGnssToUsbSerial", },
15181519
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, _uint32_t, 0, & settings.radioPortBaud, "radioPortBaud", },
15191520
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, _int16_t, 0, & settings.serialTimeoutGNSS, "serialTimeoutGNSS", },
1521+
{ 1, 1, 0, 0, 0, 1, 0, 0, 1, _bool, 0, & settings.enableNmeaOnRadio, "enableNmeaOnRadio", },
15201522

15211523
// F
15221524
// a
21.6 KB
Loading

0 commit comments

Comments
 (0)