@@ -263,7 +263,7 @@ t_cliResult processCommand(char *cmdBuffer)
263
263
// Apply factory defaults, then reset
264
264
commandSendExecuteOkResponse (tokens[0 ], tokens[1 ]);
265
265
factoryReset (false ); // We do not have the SD semaphore
266
- return (CLI_OK); // We should never get this far.
266
+ return (CLI_OK); // We should never get this far.
267
267
}
268
268
else
269
269
{
@@ -1516,9 +1516,7 @@ void createSettingsString(char *newSettings)
1516
1516
strncpy (apPlatformPrefix, platformPrefixTable[productVariant], sizeof (apPlatformPrefix));
1517
1517
stringRecord (newSettings, " platformPrefix" , apPlatformPrefix);
1518
1518
1519
- char apRtkFirmwareVersion[86 ];
1520
- firmwareVersionGet (apRtkFirmwareVersion, sizeof (apRtkFirmwareVersion), true );
1521
- stringRecord (newSettings, " rtkFirmwareVersion" , apRtkFirmwareVersion);
1519
+ stringRecord (newSettings, " rtkFirmwareVersion" , (char *)printRtkFirmwareVersion ());
1522
1520
1523
1521
char apGNSSFirmwareVersion[80 ];
1524
1522
if (present.gnss_zedf9p )
@@ -2921,13 +2919,19 @@ SettingValueResponse getSettingValue(bool inCommands, const char *settingName, c
2921
2919
else if (knownSetting == true )
2922
2920
return (SETTING_KNOWN);
2923
2921
2924
- // Report deviceID over CLI - Useful for label generation
2922
+ // Report special human-machine-interface settings
2925
2923
if (strcmp (settingName, " deviceId" ) == 0 )
2926
2924
{
2927
2925
writeToString (settingValueStr, (char *)printDeviceId ());
2928
2926
knownSetting = true ;
2929
2927
settingIsString = true ;
2930
2928
}
2929
+ else if (strcmp (settingName, " rtkFirmwareVersion" ) == 0 )
2930
+ {
2931
+ writeToString (settingValueStr, (char *)printRtkFirmwareVersion ());
2932
+ knownSetting = true ;
2933
+ settingIsString = true ;
2934
+ }
2931
2935
2932
2936
// Special actions
2933
2937
else if (strcmp (settingName, " enableRCFirmware" ) == 0 )
@@ -3507,8 +3511,16 @@ const char *commandGetName(int stringIndex, int rtkIndex)
3507
3511
else if (rtkIndex == COMMAND_PROFILE_NUMBER)
3508
3512
return " profileNumber" ;
3509
3513
3514
+ // Display the current firmware version number
3515
+ else if (rtkIndex == COMMAND_FIRMWARE_VERSION)
3516
+ return " rtkFirmwareVersion" ;
3517
+
3510
3518
// Display the device ID - used in PointPerfect
3511
- return " deviceId" ;
3519
+ else if (rtkIndex == COMMAND_DEVICE_ID)
3520
+ return " deviceId" ;
3521
+
3522
+ systemPrintln (" commandGetName Error: Uncaught command type" );
3523
+ return " unknown" ;
3512
3524
}
3513
3525
3514
3526
// Determine if the setting is available on this platform
@@ -3658,7 +3670,7 @@ bool commandIndexFill(bool usePossibleSettings)
3658
3670
}
3659
3671
}
3660
3672
3661
- // Add the man -machine interface commands to the list
3673
+ // Add the human -machine- interface commands to the list
3662
3674
for (i = 1 ; i < COMMAND_COUNT; i++)
3663
3675
commandIndex[commandCount++] = -i;
3664
3676
@@ -3667,8 +3679,10 @@ bool commandIndexFill(bool usePossibleSettings)
3667
3679
// If "endOfPrioritySettings" is not found, prioritySettingsEnd will be zero
3668
3680
// and all settings will be sorted. Just like the good old days...
3669
3681
3670
- if (settings.debugSettings )
3682
+ if (settings.debugSettings || settings. debugCLI )
3671
3683
{
3684
+ systemPrintf (" commandCount %d\r\n " , commandCount);
3685
+
3672
3686
if (prioritySettingsEnd > 0 )
3673
3687
systemPrintf (" endOfPrioritySettings found at entry %d\r\n " , prioritySettingsEnd);
3674
3688
else
@@ -3714,7 +3728,7 @@ void printAvailableSettings()
3714
3728
commandList (false , commandIndex[i]);
3715
3729
}
3716
3730
3717
- // Below are commands formed specifically for the Man -Machine-Interface
3731
+ // Below are commands formed specifically for the Human -Machine-Interface
3718
3732
// Display the profile name - used in Profiles
3719
3733
else if (commandIndex[i] >= -MAX_PROFILE_COUNT)
3720
3734
{
@@ -3736,6 +3750,16 @@ void printAvailableSettings()
3736
3750
commandSendExecuteListResponse (" profileNumber" , " uint8_t" , settingValue);
3737
3751
}
3738
3752
3753
+ // Display the current RTK Firmware version
3754
+ else if (commandIndex[i] == COMMAND_FIRMWARE_VERSION)
3755
+ {
3756
+ // Create the settingType based on the length of the firmware version
3757
+ char settingType[100 ];
3758
+ snprintf (settingType, sizeof (settingType), " char[%d]" , strlen (printRtkFirmwareVersion ()));
3759
+
3760
+ commandSendExecuteListResponse (" rtkFirmwareVersion" , settingType, printRtkFirmwareVersion ());
3761
+ }
3762
+
3739
3763
// Display the device ID - used in PointPerfect
3740
3764
else if (commandIndex[i] == COMMAND_DEVICE_ID)
3741
3765
{
0 commit comments