File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,20 @@ void beginGNSS()
338338    if  (ptr != NULL )
339339      strcpy (zedFirmwareVersion, ptr + strlen (" FWVER="  ));
340340
341+     // Convert version to a uint8_t
342+     if  (strstr (zedFirmwareVersion, " 1.00"  ) != NULL )
343+       zedFirmwareVersionInt = 100 ;
344+     else  if  (strstr (zedFirmwareVersion, " 1.12"  ) != NULL )
345+       zedFirmwareVersionInt = 112 ;
346+     else  if  (strstr (zedFirmwareVersion, " 1.13"  ) != NULL )
347+       zedFirmwareVersionInt = 113 ;
348+     else  if  (strstr (zedFirmwareVersion, " 1.20"  ) != NULL ) // Mostly for F9R HPS 1.20, but also F9P HPG v1.20 Spartan future support
349+       zedFirmwareVersionInt = 120 ;
350+     else  if  (strstr (zedFirmwareVersion, " 1.21"  ) != NULL ) // Future F9R HPS v1.21
351+       zedFirmwareVersionInt = 121 ;
352+     else 
353+       Serial.printf (" Unknown firmware version: %s"  , zedFirmwareVersion);
354+ 
341355    // Determine if we have a ZED-F9P (Express/Facet) or an ZED-F9R (Express Plus/Facet Plus)
342356    if  (strstr (i2cGNSS.minfo .extension [3 ], " ZED-F9P"  ) != NULL )
343357    {
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ uint32_t casterResponseWaitStartTime = 0; //Used to detect if caster service tim
150150#include  < SparkFun_u-blox_GNSS_Arduino_Library.h>   // http://librarymanager/All#SparkFun_u-blox_GNSS
151151
152152char  zedFirmwareVersion[20 ]; // The string looks like 'HPG 1.12'. Output to debug menu and settings file.
153+ uint8_t  zedFirmwareVersionInt = 0 ; // Controls which features (constellations) can be configured (v1.12 doesn't support SBAS)
153154uint8_t  zedModuleType = PLATFORM_F9P; // Controls which messages are supported and configured
154155
155156//  Extend the class for getModuleInfo. Used to diplay ZED-F9P firmware version in debug menu.
Original file line number Diff line number Diff line change @@ -265,10 +265,19 @@ bool configureConstellations()
265265  // long startTime = millis();
266266  for  (int  x = 0  ; x < MAX_CONSTELLATIONS ; x++)
267267  {
268-     // Standard UBX protocol method takes ~533-783ms
269-     uint8_t  currentlyEnabled = getConstellation (settings.ubxConstellations [x].gnssID ); // Qeury the module for the current setting
270-     if  (currentlyEnabled != settings.ubxConstellations [x].enabled )
271-       response &= setConstellation (settings.ubxConstellations [x].gnssID , settings.ubxConstellations [x].enabled );
268+     // v1.12 ZED firmware does not allow for SBAS control
269+     // Also, if we can't identify the version (0), skip SBAS enable
270+     if  (zedModuleType == PLATFORM_F9P && (zedFirmwareVersionInt == 112  || zedFirmwareVersionInt == 0 ) && x == 1 ) // SBAS
271+     {
272+       // Do nothing
273+     }
274+     else 
275+     {
276+       // Standard UBX protocol method takes ~533-783ms
277+       uint8_t  currentlyEnabled = getConstellation (settings.ubxConstellations [x].gnssID ); // Qeury the module for the current setting
278+       if  (currentlyEnabled != settings.ubxConstellations [x].enabled )
279+         response &= setConstellation (settings.ubxConstellations [x].gnssID , settings.ubxConstellations [x].enabled );
280+     }
272281
273282    // Get/set val method takes ~642ms but does not work because we don't send additional sigCfg keys at same time
274283    //     uint8_t currentlyEnabled = i2cGNSS.getVal8(settings.ubxConstellations[x].configKey, VAL_LAYER_RAM, 1200);
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments