@@ -412,7 +412,7 @@ bool GNSS_LG290P::configureRover()
412412 if (settings.debugGnss && response == false )
413413 systemPrintln (" configureRover: Set rate failed" );
414414
415- response &= setHighAccuracyService (settings.enableGalileoHas );
415+ response &= setHighAccuracyService (settings.enableGalileoHas , ( const char *)settings. configurePPP );
416416
417417 response &= enableRTCMRover ();
418418 if (settings.debugGnss && response == false )
@@ -528,7 +528,7 @@ bool GNSS_LG290P::configureBase()
528528
529529 response &= setMinCnoRadio (settings.minCNO );
530530
531- response &= setHighAccuracyService (settings.enableGalileoHas );
531+ response &= setHighAccuracyService (settings.enableGalileoHas , ( const char *)settings. configurePPP );
532532
533533 response &= enableRTCMBase (); // Set RTCM messages
534534 if (settings.debugGnss && response == false )
@@ -1912,6 +1912,9 @@ void GNSS_LG290P::menuConstellations()
19121912 {
19131913 systemPrintf (" %d) Galileo E6 Corrections: %s\r\n " , MAX_LG290P_CONSTELLATIONS + 1 ,
19141914 settings.enableGalileoHas ? " Enabled" : " Disabled" );
1915+ if (settings.enableGalileoHas )
1916+ systemPrintf (" %d) PPP Configuration: \" %s\"\r\n " , MAX_LG290P_CONSTELLATIONS + 2 ,
1917+ settings.configurePPP );
19151918 }
19161919
19171920 systemPrintln (" x) Exit" );
@@ -1928,6 +1931,31 @@ void GNSS_LG290P::menuConstellations()
19281931 {
19291932 settings.enableGalileoHas ^= 1 ;
19301933 }
1934+ else if ((incoming == MAX_LG290P_CONSTELLATIONS + 2 ) && present.galileoHasCapable && settings.enableGalileoHas )
1935+ {
1936+ systemPrintln (" Enter the PPP configuration separated by spaces, not commas:" );
1937+ char newConfig[sizeof (settings.configurePPP )];
1938+ getUserInputString (newConfig, sizeof (newConfig));
1939+ bool isValid = true ;
1940+ int spacesSeen = 0 ;
1941+ for (size_t i = 0 ; i < strlen (newConfig); i++)
1942+ {
1943+ if ((isValid) && (newConfig[i] == ' ,' )) // Check for no commas
1944+ {
1945+ systemPrintln (" Comma detected. Please try again" );
1946+ isValid = false ;
1947+ }
1948+ if (newConfig[i] == ' ' )
1949+ spacesSeen++;
1950+ }
1951+ if ((isValid) && (spacesSeen < 4 )) // Check for at least 4 spaces
1952+ {
1953+ systemPrintln (" Configuration should contain at least 4 spaces" );
1954+ isValid = false ;
1955+ }
1956+ if (isValid)
1957+ snprintf (settings.configurePPP , sizeof (settings.configurePPP ), " %s" , newConfig);
1958+ }
19311959 else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
19321960 break ;
19331961 else if (incoming == INPUT_RESPONSE_GETNUMBER_TIMEOUT)
@@ -1939,7 +1967,7 @@ void GNSS_LG290P::menuConstellations()
19391967 // Apply current settings to module
19401968 gnss->setConstellations ();
19411969
1942- setHighAccuracyService (settings.enableGalileoHas );
1970+ setHighAccuracyService (settings.enableGalileoHas , ( const char *)settings. configurePPP );
19431971
19441972 clearBuffer (); // Empty buffer of any newline chars
19451973}
@@ -2415,7 +2443,7 @@ bool GNSS_LG290P::setElevation(uint8_t elevationDegrees)
24152443}
24162444
24172445// ----------------------------------------
2418- bool GNSS_LG290P::setHighAccuracyService (bool enableGalileoHas)
2446+ bool GNSS_LG290P::setHighAccuracyService (bool enableGalileoHas, const char *configurePPP )
24192447{
24202448 bool result = true ;
24212449
@@ -2429,7 +2457,9 @@ bool GNSS_LG290P::setHighAccuracyService(bool enableGalileoHas)
24292457 {
24302458 // $PQTMCFGPPP,W,2,1,120,0.10,0.15*68
24312459 // Enable E6 HAS, WGS84, 120 timeout, 0.10m Horizontal convergence accuracy threshold, 0.15m Vertical threshold
2432- if (_lg290p->sendOkCommand (" $PQTMCFGPPP" , " ,W,2,1,120,0.10,0.15" ) == true )
2460+ char paramConfigurePPP[sizeof (settings.configurePPP ) + 4 ];
2461+ snprintf (paramConfigurePPP, sizeof (paramConfigurePPP), " ,W,%s" , configPppSpacesToCommas (configurePPP));
2462+ if (_lg290p->sendOkCommand (" $PQTMCFGPPP" , paramConfigurePPP) == true )
24332463 {
24342464 systemPrintln (" Galileo E6 HAS service enabled" );
24352465 }
0 commit comments