Skip to content

Commit 1766327

Browse files
committed
And detected GNSS receiver to NVM
1 parent 59df342 commit 1766327

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

Firmware/RTK_Everywhere/NVM.ino

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,12 @@ void recordSystemSettingsToFile(File *settingsFile)
647647
}
648648
break;
649649
#endif // COMPILE_LG290P
650+
651+
case tGnssReceiver: {
652+
gnssReceiverType_e *ptr = (gnssReceiverType_e *)rtkSettingsEntries[i].var;
653+
settingsFile->printf("%s=%d\r\n", rtkSettingsEntries[i].name, (int)*ptr);
654+
}
655+
break;
650656
}
651657
}
652658

@@ -1066,8 +1072,7 @@ bool parseLine(char *str)
10661072
else
10671073
{
10681074
const char *table[] = {
1069-
"gnssFirmwareVersion", "gnssUniqueId", "neoFirmwareVersion",
1070-
"rtkFirmwareVersion", "rtkIdentifier",
1075+
"gnssFirmwareVersion", "gnssUniqueId", "neoFirmwareVersion", "rtkFirmwareVersion", "rtkIdentifier",
10711076
};
10721077
const int tableEntries = sizeof(table) / sizeof(table[0]);
10731078

@@ -1590,6 +1595,13 @@ bool parseLine(char *str)
15901595
}
15911596
break;
15921597
#endif // COMPILE_LG290P
1598+
1599+
case tGnssReceiver: {
1600+
gnssReceiverType_e *ptr = (gnssReceiverType_e *)var;
1601+
*ptr = (gnssReceiverType_e)d;
1602+
knownSetting = true;
1603+
}
1604+
break;
15931605
}
15941606
}
15951607
}

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,13 @@ SettingValueResponse updateSettingWithValue(bool inCommands, const char *setting
11021102
}
11031103
break;
11041104
#endif // COMPILE_LG290P
1105+
1106+
case tGnssReceiver: {
1107+
gnssReceiverType_e *ptr = (gnssReceiverType_e *)var;
1108+
*ptr = (gnssReceiverType_e)settingValue;
1109+
knownSetting = true;
1110+
}
1111+
break;
11051112
}
11061113
}
11071114

@@ -1908,6 +1915,12 @@ void createSettingsString(char *newSettings)
19081915
}
19091916
break;
19101917
#endif // COMPILE_LG290P
1918+
1919+
case tGnssReceiver: {
1920+
gnssReceiverType_e *ptr = (gnssReceiverType_e *)rtkSettingsEntries[i].var;
1921+
stringRecord(newSettings, rtkSettingsEntries[i].name, (int)*ptr);
1922+
}
1923+
break;
19111924
}
19121925
}
19131926
}
@@ -2792,6 +2805,13 @@ SettingValueResponse getSettingValue(bool inCommands, const char *settingName, c
27922805
}
27932806
break;
27942807
#endif // COMPILE_LG290P
2808+
2809+
case tGnssReceiver: {
2810+
gnssReceiverType_e *ptr = (gnssReceiverType_e *)var;
2811+
writeToString(settingValueStr, (int)*ptr);
2812+
knownSetting = true;
2813+
}
2814+
break;
27952815
}
27962816
}
27972817

@@ -3345,6 +3365,12 @@ void commandList(bool inCommands, int i)
33453365
}
33463366
break;
33473367
#endif // COMPILE_LG290P
3368+
3369+
case tGnssReceiver: {
3370+
getSettingValue(inCommands, rtkSettingsEntries[i].name, settingValue);
3371+
commandSendExecuteListResponse(rtkSettingsEntries[i].name, "gnssReceiverType_e", settingValue);
3372+
}
3373+
break;
33483374
}
33493375
}
33503376

0 commit comments

Comments
 (0)