mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Force settings upgrade on PinecilV2
Fix forced settings upgrade on Pinecilv2
This commit is contained in:
@@ -11,7 +11,13 @@
|
|||||||
#define SETTINGS_H_
|
#define SETTINGS_H_
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#define SETTINGSVERSION (0x2A) // This number is frozen, do not edit
|
|
||||||
|
#ifdef MODEL_Pinecilv2
|
||||||
|
// Required settings reset for PR #1916
|
||||||
|
#define SETTINGSVERSION (0x55AB) // This number is frozen, do not edit
|
||||||
|
#else
|
||||||
|
#define SETTINGSVERSION (0x55AA) // This number is frozen, do not edit
|
||||||
|
#endif
|
||||||
|
|
||||||
enum SettingsOptions {
|
enum SettingsOptions {
|
||||||
SolderingTemp = 0, // current set point for the iron
|
SolderingTemp = 0, // current set point for the iron
|
||||||
|
|||||||
@@ -135,9 +135,9 @@ bool sanitiseSettings() {
|
|||||||
// For all settings, need to ensure settings are in a valid range
|
// For all settings, need to ensure settings are in a valid range
|
||||||
// First for any not know about due to array growth, reset them and update the length value
|
// First for any not know about due to array growth, reset them and update the length value
|
||||||
bool dirty = false;
|
bool dirty = false;
|
||||||
if (systemSettings.versionMarker != 0x55AA) {
|
if (systemSettings.versionMarker != SETTINGSVERSION) {
|
||||||
memset((void *)&systemSettings, 0xFF, sizeof(systemSettings));
|
memset((void *)&systemSettings, 0xFF, sizeof(systemSettings));
|
||||||
systemSettings.versionMarker = 0x55AA;
|
systemSettings.versionMarker = SETTINGSVERSION;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
if (systemSettings.padding != 0xFFFFFFFF) {
|
if (systemSettings.padding != 0xFFFFFFFF) {
|
||||||
|
|||||||
Reference in New Issue
Block a user