Browse Source

Fix EEPROM SettingsData for 32-bit architectures

Thomas Moore 6 years ago
parent
commit
cfd989d7c5
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      Marlin/src/module/configuration_store.cpp

+ 7
- 3
Marlin/src/module/configuration_store.cpp View File

@@ -71,6 +71,8 @@
71 71
   #include "../feature/fwretract.h"
72 72
 #endif
73 73
 
74
+#pragma pack(push, 1) // No padding between variables
75
+
74 76
 typedef struct PID { float Kp, Ki, Kd; } PID;
75 77
 typedef struct PIDC { float Kp, Ki, Kd, Kc; } PIDC;
76 78
 
@@ -170,9 +172,9 @@ typedef struct SettingsDataStruct {
170 172
   //
171 173
   // ULTIPANEL
172 174
   //
173
-  int lcd_preheat_hotend_temp[2],                       // M145 S0 H
174
-      lcd_preheat_bed_temp[2],                          // M145 S0 B
175
-      lcd_preheat_fan_speed[2];                         // M145 S0 F
175
+  int16_t lcd_preheat_hotend_temp[2],                   // M145 S0 H
176
+          lcd_preheat_bed_temp[2],                      // M145 S0 B
177
+          lcd_preheat_fan_speed[2];                     // M145 S0 F
176 178
 
177 179
   //
178 180
   // PIDTEMP
@@ -247,6 +249,8 @@ typedef struct SettingsDataStruct {
247 249
 
248 250
 } SettingsData;
249 251
 
252
+#pragma pack(pop)
253
+
250 254
 MarlinSettings settings;
251 255
 
252 256
 uint16_t MarlinSettings::datasize() { return sizeof(SettingsData); }

Loading…
Cancel
Save