Skip to content

Commit 29ceb65

Browse files
committed
Fix profile name editing
1 parent 659ca02 commit 29ceb65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Firmware/RTK_Surveyor/NVM.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
//So we moved again to SPIFFs. It's being replaced by LittleFS so here we are.
1919
void loadSettings()
2020
{
21-
//First, look up the last used profile number
22-
loadProfileNumber();
21+
//loadProfileNumber(); - Previously loaded during loadSettingsPartial()
2322

2423
//Set the settingsFileName used many places
2524
sprintf(settingsFileName, "/%s_Settings_%d.txt", platformFilePrefix, profileNumber);

Firmware/RTK_Surveyor/menuMain.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,13 @@ void menuUserProfiles()
144144

145145
if (incoming >= 1 && incoming <= MAX_PROFILE_COUNT)
146146
{
147-
148147
settings.updateZEDSettings = true; //When this profile is loaded next, force system to update ZED settings.
149148
recordSystemSettings(); //Before switching, we need to record the current settings to LittleFS and SD
150149

151150
recordProfileNumber(incoming - 1); //Align to array
152151
profileNumber = incoming - 1;
152+
153+
sprintf(settingsFileName, "/%s_Settings_%d.txt", platformFilePrefix, profileNumber); //Update file name with new profileNumber
153154
}
154155
else if (incoming == MAX_PROFILE_COUNT + 1)
155156
{

0 commit comments

Comments
 (0)