Skip to content

Commit 0b88976

Browse files
committed
Use printDeviceId() helper
1 parent 3ef96cb commit 0b88976

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

Firmware/RTK_Everywhere/NtripClient.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ void ntripClientUpdate()
815815
systemPrintf("NTRIP Caster responded with unauthorized error. Your account may be deactivated. "
816816
"Please contact "
817817
"[email protected] or goto %s to renew the PointPerfect "
818-
"subscription. Please reference device ID: %X\r\n",
819-
platformRegistrationPageTable[productVariant], btMACAddress);
818+
"subscription. Please reference device ID: %x\r\n",
819+
platformRegistrationPageTable[productVariant], printDeviceId());
820820
}
821821
else
822822
{

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,10 +2023,7 @@ void createSettingsString(char *newSettings)
20232023
stringRecord(newSettings, "sdMounted", online.microSD);
20242024

20252025
// Add Device ID used for corrections
2026-
char hardwareID[15];
2027-
snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X%02X", btMACAddress[0], btMACAddress[1],
2028-
btMACAddress[2], btMACAddress[3], btMACAddress[4], btMACAddress[5], productVariant);
2029-
stringRecord(newSettings, "hardwareID", hardwareID);
2026+
stringRecord(newSettings, "hardwareID", printDeviceId());
20302027

20312028
// Add Days Remaining for corrections
20322029
char apDaysRemaining[20];
@@ -2838,11 +2835,7 @@ SettingValueResponse getSettingValue(bool inCommands, const char *settingName, c
28382835
// Report deviceID over CLI - Useful for label generation
28392836
if (strcmp(settingName, "deviceId") == 0)
28402837
{
2841-
char hardwareID[15];
2842-
snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X%02X", btMACAddress[0], btMACAddress[1],
2843-
btMACAddress[2], btMACAddress[3], btMACAddress[4], btMACAddress[5], productVariant);
2844-
2845-
writeToString(settingValueStr, hardwareID);
2838+
writeToString(settingValueStr, printDeviceId());
28462839
knownSetting = true;
28472840
settingIsString = true;
28482841
}

0 commit comments

Comments
 (0)