@@ -122,6 +122,22 @@ void GNSS_LG290P::begin()
122
122
" firmware on your LG290P to allow for these features. Please see https://bit.ly/sfe-rtk-lg290p-update\r\n " ,
123
123
lg290pFirmwareVersion, gnssFirmwareVersion);
124
124
}
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
+ }
125
141
126
142
printModuleInfo ();
127
143
@@ -323,6 +339,10 @@ bool GNSS_LG290P::configureRover()
323
339
systemPrintln (" configureRover: Set mode rover failed" );
324
340
}
325
341
342
+ response &= setElevation (settings.minElev );
343
+
344
+ response &= setMinCnoRadio (settings.minCNO );
345
+
326
346
// Set the fix rate. Default on LG290P is 10Hz so set accordingly.
327
347
response &= setRate (settings.measurementRateMs / 1000.0 ); // May require save/reset
328
348
if (settings.debugGnss && response == false )
@@ -432,6 +452,10 @@ bool GNSS_LG290P::configureBase()
432
452
systemPrintln (" configureBase: disable survey in failed" );
433
453
}
434
454
455
+ response &= setElevation (settings.minElev );
456
+
457
+ response &= setMinCnoRadio (settings.minCNO );
458
+
435
459
response &= enableRTCMBase (); // Set RTCM messages
436
460
if (settings.debugGnss && response == false )
437
461
systemPrintln (" configureBase: Enable RTCM failed" );
@@ -514,7 +538,8 @@ bool GNSS_LG290P::enterConfigMode(unsigned long waitForSemaphoreTimeout_millis)
514
538
{
515
539
unsigned long start = millis ();
516
540
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
518
543
isBlocking = _lg290p->isBlocking ();
519
544
} while (isBlocking && (millis () < (start + waitForSemaphoreTimeout_millis)));
520
545
@@ -1837,7 +1862,8 @@ void GNSS_LG290P::printModuleInfo()
1837
1862
std::string version, buildDate, buildTime;
1838
1863
if (_lg290p->getVersionInfo (version, buildDate, buildTime))
1839
1864
{
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 ());
1841
1867
}
1842
1868
else
1843
1869
{
@@ -1975,8 +2001,12 @@ bool GNSS_LG290P::setCorrRadioExtPort(bool enable, bool force)
1975
2001
// ----------------------------------------
1976
2002
bool GNSS_LG290P::setElevation (uint8_t elevationDegrees)
1977
2003
{
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 ;
1980
2010
}
1981
2011
1982
2012
// ----------------------------------------
@@ -2005,8 +2035,12 @@ bool GNSS_LG290P::setMessagesUsb(int maxRetries)
2005
2035
// ----------------------------------------
2006
2036
bool GNSS_LG290P::setMinCnoRadio (uint8_t cnoValue)
2007
2037
{
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 ;
2010
2044
}
2011
2045
2012
2046
// ----------------------------------------
0 commit comments