@@ -122,6 +122,22 @@ void GNSS_LG290P::begin()
122122 " firmware on your LG290P to allow for these features. Please see https://bit.ly/sfe-rtk-lg290p-update\r\n " ,
123123 lg290pFirmwareVersion, gnssFirmwareVersion);
124124 }
125+ if (lg290pFirmwareVersion < 5 )
126+ {
127+ systemPrintf (
128+ " Current LG290P firmware: v%d (full form: %s). Elevation and CNR mask configuration require v5 or newer. "
129+ " Please "
130+ " update the "
131+ " firmware on your LG290P to allow for these features. Please see https://bit.ly/sfe-rtk-lg290p-update\r\n " ,
132+ lg290pFirmwareVersion, gnssFirmwareVersion);
133+ }
134+
135+ if (lg290pFirmwareVersion >= 5 )
136+ {
137+ // Supported starting in v05
138+ present.minElevation = true ;
139+ present.minCno = true ;
140+ }
125141
126142 printModuleInfo ();
127143
@@ -323,6 +339,10 @@ bool GNSS_LG290P::configureRover()
323339 systemPrintln (" configureRover: Set mode rover failed" );
324340 }
325341
342+ response &= setElevation (settings.minElev );
343+
344+ response &= setMinCnoRadio (settings.minCNO );
345+
326346 // Set the fix rate. Default on LG290P is 10Hz so set accordingly.
327347 response &= setRate (settings.measurementRateMs / 1000.0 ); // May require save/reset
328348 if (settings.debugGnss && response == false )
@@ -432,6 +452,10 @@ bool GNSS_LG290P::configureBase()
432452 systemPrintln (" configureBase: disable survey in failed" );
433453 }
434454
455+ response &= setElevation (settings.minElev );
456+
457+ response &= setMinCnoRadio (settings.minCNO );
458+
435459 response &= enableRTCMBase (); // Set RTCM messages
436460 if (settings.debugGnss && response == false )
437461 systemPrintln (" configureBase: Enable RTCM failed" );
@@ -514,7 +538,8 @@ bool GNSS_LG290P::enterConfigMode(unsigned long waitForSemaphoreTimeout_millis)
514538 {
515539 unsigned long start = millis ();
516540 bool isBlocking;
517- do { // Wait for up to waitForSemaphoreTimeout for library to stop blocking
541+ do
542+ { // Wait for up to waitForSemaphoreTimeout for library to stop blocking
518543 isBlocking = _lg290p->isBlocking ();
519544 } while (isBlocking && (millis () < (start + waitForSemaphoreTimeout_millis)));
520545
@@ -1837,7 +1862,8 @@ void GNSS_LG290P::printModuleInfo()
18371862 std::string version, buildDate, buildTime;
18381863 if (_lg290p->getVersionInfo (version, buildDate, buildTime))
18391864 {
1840- systemPrintf (" LG290P version: v%02d - %s %s %s - v%d\r\n " , lg290pFirmwareVersion, version.c_str (), buildDate.c_str (), buildTime.c_str ());
1865+ systemPrintf (" LG290P version: v%02d - %s %s %s - v%d\r\n " , lg290pFirmwareVersion, version.c_str (),
1866+ buildDate.c_str (), buildTime.c_str ());
18411867 }
18421868 else
18431869 {
@@ -1975,8 +2001,12 @@ bool GNSS_LG290P::setCorrRadioExtPort(bool enable, bool force)
19752001// ----------------------------------------
19762002bool GNSS_LG290P::setElevation (uint8_t elevationDegrees)
19772003{
1978- // Not a feature on LG290p
1979- return false ;
2004+ // Present on >= v05
2005+ if (lg290pFirmwareVersion >= 5 )
2006+ return (_lg290p->setElevationAngle (elevationDegrees));
2007+
2008+ // Because we call this during module setup we rely on a positive result
2009+ return true ;
19802010}
19812011
19822012// ----------------------------------------
@@ -2005,8 +2035,12 @@ bool GNSS_LG290P::setMessagesUsb(int maxRetries)
20052035// ----------------------------------------
20062036bool GNSS_LG290P::setMinCnoRadio (uint8_t cnoValue)
20072037{
2008- // Not a feature on LG290p
2009- return false ;
2038+ // Present on >= v05
2039+ if (lg290pFirmwareVersion >= 5 )
2040+ return (_lg290p->setCNR ((float )cnoValue)); // 0.0 to 99.0
2041+
2042+ // Because we call this during module setup we rely on a positive result
2043+ return true ;
20102044}
20112045
20122046// ----------------------------------------
0 commit comments