This commit is contained in:
@@ -24,15 +24,15 @@ void loadButtonConfig() {
|
||||
// Persist and load best times
|
||||
void saveBestTimes() {
|
||||
preferences.begin("times", false);
|
||||
preferences.putULong("best1", timerData.bestTime1);
|
||||
preferences.putULong("best2", timerData.bestTime2);
|
||||
preferences.putULong("best1", timerData1.bestTime);
|
||||
preferences.putULong("best2", timerData2.bestTime);
|
||||
preferences.end();
|
||||
}
|
||||
|
||||
void loadBestTimes() {
|
||||
preferences.begin("times", true);
|
||||
timerData.bestTime1 = preferences.getULong("best1", 0);
|
||||
timerData.bestTime2 = preferences.getULong("best2", 0);
|
||||
timerData1.bestTime = preferences.getULong("best1", 0);
|
||||
timerData2.bestTime = preferences.getULong("best2", 0);
|
||||
preferences.end();
|
||||
}
|
||||
|
||||
@@ -93,4 +93,15 @@ int checkLicence() {
|
||||
return tier;
|
||||
}
|
||||
|
||||
void saveLocationIdToPrefs(const String &locationId) {
|
||||
preferences.begin("locationid", false);
|
||||
preferences.putString("locationid", locationId);
|
||||
preferences.end();
|
||||
}
|
||||
|
||||
String getLocationIdFromPrefs() {
|
||||
preferences.begin("locationid", true);
|
||||
String locationId = preferences.getString("locationid", "");
|
||||
preferences.end();
|
||||
return locationId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user