@@ -267,7 +267,7 @@ void menuMessagesBaseRTCM()
267267 int incoming = getNumber (); // Returns EXIT, TIMEOUT, or long
268268
269269 if (incoming == 1 )
270- menuMessagesSubtype (settings.ubxMessageRatesBase , " RTCM" );
270+ menuMessagesSubtype (settings.ubxMessageRatesBase , " RTCM-Base " );
271271 else if (incoming == 2 )
272272 {
273273 settings.ubxMessageRatesBase [getMessageNumberByName (" UBX_RTCM_1005" )] = 1 ; // 1105
@@ -330,13 +330,24 @@ void menuMessagesSubtype(uint8_t *localMessageRate, const char* messageType)
330330
331331 int startOfBlock = 0 ;
332332 int endOfBlock = 0 ;
333- setMessageOffsets (ubxMessages, messageType, startOfBlock, endOfBlock); // Find start and stop of given messageType in message array
333+ int rtcmOffset = 0 ; // Used to offset messageSupported lookup
334+
335+ if (strcmp (messageType, " RTCM-Base" ) == 0 ) // The ubxMessageRatesBase array is 0 to MAX_UBX_MSG_RTCM - 1
336+ {
337+ Serial.println (" Special handling" );
338+ startOfBlock = 0 ;
339+ endOfBlock = MAX_UBX_MSG_RTCM;
340+ rtcmOffset = getMessageNumberByName (" UBX_RTCM_1005" );
341+ }
342+ else
343+ setMessageOffsets (ubxMessages, messageType, startOfBlock, endOfBlock); // Find start and stop of given messageType in message array
344+
334345 for (int x = 0 ; x < (endOfBlock - startOfBlock) ; x++)
335346 {
336347 // Check to see if this ZED platform supports this message
337- if (messageSupported (x + startOfBlock) == true )
348+ if (messageSupported (x + startOfBlock + rtcmOffset ) == true )
338349 {
339- systemPrintf (" %d) Message %s: " , x + 1 , ubxMessages[x + startOfBlock].msgTextName );
350+ systemPrintf (" %d) Message %s: " , x + 1 , ubxMessages[x + startOfBlock + rtcmOffset ].msgTextName );
340351 systemPrintln (localMessageRate[x + startOfBlock]);
341352 }
342353 }
@@ -765,7 +776,7 @@ uint8_t getMessageNumberByName(const char *msgName)
765776 return (0 );
766777}
767778
768- // Check rates to see if they need to be reset
779+ // Check rates to see if they need to be reset to defaults
769780void checkMessageRates ()
770781{
771782 if (settings.ubxMessageRates [0 ] == 254 )
0 commit comments