Browse Source

Unsigned eeprom mesh addresses

Scott Lahteine 7 years ago
parent
commit
da94e0bd27

+ 1
- 1
Marlin/src/module/configuration_store.cpp View File

1607
       }
1607
       }
1608
     #endif
1608
     #endif
1609
 
1609
 
1610
-    int16_t MarlinSettings::meshes_start_index() {
1610
+    uint16_t MarlinSettings::meshes_start_index() {
1611
       return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8;  // Pad the end of configuration data so it can float up
1611
       return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8;  // Pad the end of configuration data so it can float up
1612
                                                           // or down a little bit without disrupting the mesh data
1612
                                                           // or down a little bit without disrupting the mesh data
1613
     }
1613
     }

+ 4
- 4
Marlin/src/module/configuration_store.h View File

63
 
63
 
64
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
64
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
65
                                          // That can store is enabled
65
                                          // That can store is enabled
66
-        static int16_t meshes_start_index();
67
-        FORCE_INLINE static int16_t meshes_end_index() { return meshes_end; }
66
+        static uint16_t meshes_start_index();
67
+        FORCE_INLINE static uint16_t meshes_end_index() { return meshes_end; }
68
         static uint16_t calc_num_meshes();
68
         static uint16_t calc_num_meshes();
69
         static int mesh_slot_offset(const int8_t slot);
69
         static int mesh_slot_offset(const int8_t slot);
70
         static void store_mesh(const int8_t slot);
70
         static void store_mesh(const int8_t slot);
98
 
98
 
99
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
99
       #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
100
                                          // That can store is enabled
100
                                          // That can store is enabled
101
-        static constexpr int16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
102
-                                                           // live at the very end of the eeprom
101
+        static constexpr uint16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
102
+                                                            // live at the very end of the eeprom
103
 
103
 
104
       #endif
104
       #endif
105
 
105
 

Loading…
Cancel
Save