@@ -1933,7 +1933,28 @@ void GNSS_LG290P::menuConstellations()
19331933 }
19341934 else if ((incoming == MAX_LG290P_CONSTELLATIONS + 2 ) && present.galileoHasCapable && settings.enableGalileoHas )
19351935 {
1936- getUserInputString (settings.configurePPP , sizeof (settings.configurePPP ));
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);
19371958 }
19381959 else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
19391960 break ;
@@ -2437,7 +2458,7 @@ bool GNSS_LG290P::setHighAccuracyService(bool enableGalileoHas, const char *conf
24372458 // $PQTMCFGPPP,W,2,1,120,0.10,0.15*68
24382459 // Enable E6 HAS, WGS84, 120 timeout, 0.10m Horizontal convergence accuracy threshold, 0.15m Vertical threshold
24392460 char paramConfigurePPP[sizeof (settings.configurePPP ) + 4 ];
2440- snprintf (paramConfigurePPP, sizeof (paramConfigurePPP), " ,W,%s" , configurePPP);
2461+ snprintf (paramConfigurePPP, sizeof (paramConfigurePPP), " ,W,%s" , configPppSpacesToCommas ( configurePPP) );
24412462 if (_lg290p->sendOkCommand (" $PQTMCFGPPP" , paramConfigurePPP) == true )
24422463 {
24432464 systemPrintln (" Galileo E6 HAS service enabled" );
0 commit comments