Skip to content

Commit 6e8cd67

Browse files
committed
Add PPP temp firmware check
1 parent 888a45a commit 6e8cd67

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

Firmware/RTK_Everywhere/GNSS_LG290P.ino

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ void GNSS_LG290P::begin()
141141
present.minCno = true;
142142
}
143143

144+
// Determine if PPP temp firmware is detected.
145+
// "LG290P03AANR01A03S_PPP_TEMP0812"
146+
// "LG290P03AANR01A06S_PPP_TEMP0829"
147+
// There is also a v06 firmware that does not have PPP support.
148+
// v07 is reportedly the first version to formally support PPP
149+
if (strstr(gnssFirmwareVersion, "PPP_TEMP") != nullptr)
150+
{
151+
present.galileoHasCapable = true;
152+
systemPrintln("PPP trial firmware detected. HAS settings will now be available.");
153+
}
154+
155+
if (lg290pFirmwareVersion >= 7)
156+
{
157+
present.galileoHasCapable = true;
158+
}
159+
144160
printModuleInfo();
145161

146162
snprintf(gnssUniqueId, sizeof(gnssUniqueId), "%s", getId());
@@ -892,16 +908,14 @@ bool GNSS_LG290P::enableRTCMBase()
892908
if (enableRTCM == true)
893909
{
894910
if (settings.debugGnss)
895-
systemPrintf("Enabling Base RTCM MSM%c output with rate of %d\r\n",
896-
settings.useMSM7 ? '7' : '4', minimumRtcmRate);
911+
systemPrintf("Enabling Base RTCM MSM%c output with rate of %d\r\n", settings.useMSM7 ? '7' : '4',
912+
minimumRtcmRate);
897913

898914
// PQTMCFGRTCM fails to respond with OK over UART2 of LG290P, so don't look for it
899915
char cfgRtcm[40];
900-
snprintf(cfgRtcm, sizeof(cfgRtcm), "PQTMCFGRTCM,W,%c,0,%d,07,06,2,%d",
901-
settings.useMSM7 ? '7' : '4', settings.rtcmMinElev,
902-
minimumRtcmRate);
903-
_lg290p->sendOkCommand(
904-
cfgRtcm); // Enable MSM4/7, output regular intervals, interval (seconds)
916+
snprintf(cfgRtcm, sizeof(cfgRtcm), "PQTMCFGRTCM,W,%c,0,%d,07,06,2,%d", settings.useMSM7 ? '7' : '4',
917+
settings.rtcmMinElev, minimumRtcmRate);
918+
_lg290p->sendOkCommand(cfgRtcm); // Enable MSM4/7, output regular intervals, interval (seconds)
905919
}
906920

907921
return (response);
@@ -1054,16 +1068,16 @@ bool GNSS_LG290P::enableRTCMRover()
10541068
if (enableRTCM == true)
10551069
{
10561070
if (settings.debugCorrections)
1057-
systemPrintf("Enabling Rover RTCM MSM%c output with rate of %d\r\n",
1058-
settings.useMSM7 ? '7' : '4', minimumRtcmRate);
1071+
systemPrintf("Enabling Rover RTCM MSM%c output with rate of %d\r\n", settings.useMSM7 ? '7' : '4',
1072+
minimumRtcmRate);
10591073

10601074
// Enable MSM4/7 (for faster PPP CSRS results), output at a rate equal to the minimum RTCM rate (EPH Mode = 2)
10611075
// PQTMCFGRTCM, W, <MSM_Type>, <MSM_Mode>, <MSM_ElevThd>, <Reserved>, <Reserved>, <EPH_Mode>, <EPH_Interval>
10621076
// Set MSM_ElevThd to 15 degrees from rftop suggestion
10631077

10641078
char msmCommand[40] = {0};
1065-
snprintf(msmCommand, sizeof(msmCommand), "PQTMCFGRTCM,W,%c,0,%d,07,06,2,%d",
1066-
settings.useMSM7 ? '7' : '4', settings.rtcmMinElev, minimumRtcmRate);
1079+
snprintf(msmCommand, sizeof(msmCommand), "PQTMCFGRTCM,W,%c,0,%d,07,06,2,%d", settings.useMSM7 ? '7' : '4',
1080+
settings.rtcmMinElev, minimumRtcmRate);
10671081

10681082
// PQTMCFGRTCM fails to respond with OK over UART2 of LG290P, so don't look for it
10691083
_lg290p->sendOkCommand(msmCommand);
@@ -1957,7 +1971,6 @@ void GNSS_LG290P::menuMessages()
19571971
systemPrintln("11) Reset to PPP Logging (NMEAx7 / RTCMx4 - 30 second decimation)");
19581972
systemPrintln("12) Reset to High-rate PPP Logging (NMEAx7 / RTCMx4 - 1Hz)");
19591973

1960-
19611974
if (namedSettingAvailableOnPlatform("useMSM7")) // Redundant - but good practice for code reuse
19621975
systemPrintf("13) MSM Selection: MSM%c\r\n", settings.useMSM7 ? '7' : '4');
19631976
if (namedSettingAvailableOnPlatform("rtcmMinElev")) // Redundant - but good practice for code reuse
@@ -2036,7 +2049,8 @@ void GNSS_LG290P::menuMessages()
20362049
systemPrintln("Reset to PPP Logging Defaults (NMEAx7 / RTCMx4 - 30 second decimation)");
20372050
}
20382051
}
2039-
else if ((incoming == 13) && (namedSettingAvailableOnPlatform("useMSM7"))) // Redundant - but good practice for code reuse)
2052+
else if ((incoming == 13) &&
2053+
(namedSettingAvailableOnPlatform("useMSM7"))) // Redundant - but good practice for code reuse)
20402054
settings.useMSM7 ^= 1;
20412055
else if ((incoming == 14) && (namedSettingAvailableOnPlatform("rtcmMinElev")))
20422056
{

0 commit comments

Comments
 (0)