|
@@ -29,8 +29,6 @@
|
29
|
29
|
|
30
|
30
|
class MarlinSettings {
|
31
|
31
|
public:
|
32
|
|
- MarlinSettings() { }
|
33
|
|
-
|
34
|
32
|
static uint16_t datasize();
|
35
|
33
|
|
36
|
34
|
static void reset();
|
|
@@ -55,9 +53,15 @@ class MarlinSettings {
|
55
|
53
|
#endif
|
56
|
54
|
|
57
|
55
|
#if ENABLED(EEPROM_SETTINGS)
|
|
56
|
+
|
58
|
57
|
static bool load(); // Return 'true' if data was loaded ok
|
59
|
58
|
static bool validate(); // Return 'true' if EEPROM data is ok
|
60
|
59
|
|
|
60
|
+ static inline void first_load() {
|
|
61
|
+ static bool loaded = false;
|
|
62
|
+ if (!loaded && load()) loaded = true;
|
|
63
|
+ }
|
|
64
|
+
|
61
|
65
|
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
|
62
|
66
|
// That can store is enabled
|
63
|
67
|
static uint16_t meshes_start_index();
|
|
@@ -73,6 +77,8 @@ class MarlinSettings {
|
73
|
77
|
#else
|
74
|
78
|
FORCE_INLINE
|
75
|
79
|
static bool load() { reset(); report(); return true; }
|
|
80
|
+ FORCE_INLINE
|
|
81
|
+ static void first_load() { (void)load(); }
|
76
|
82
|
#endif
|
77
|
83
|
|
78
|
84
|
#if DISABLED(DISABLE_M503)
|