Unsigned eeprom mesh addresses

2.0.x
Scott Lahteine 7 years ago
parent f88adcbfd5
commit da94e0bd27

@ -1607,7 +1607,7 @@ void MarlinSettings::postprocess() {
} }
#endif #endif
int16_t MarlinSettings::meshes_start_index() { uint16_t MarlinSettings::meshes_start_index() {
return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; // Pad the end of configuration data so it can float up return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; // Pad the end of configuration data so it can float up
// or down a little bit without disrupting the mesh data // or down a little bit without disrupting the mesh data
} }

@ -63,8 +63,8 @@ class MarlinSettings {
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled // That can store is enabled
static int16_t meshes_start_index(); static uint16_t meshes_start_index();
FORCE_INLINE static int16_t meshes_end_index() { return meshes_end; } FORCE_INLINE static uint16_t meshes_end_index() { return meshes_end; }
static uint16_t calc_num_meshes(); static uint16_t calc_num_meshes();
static int mesh_slot_offset(const int8_t slot); static int mesh_slot_offset(const int8_t slot);
static void store_mesh(const int8_t slot); static void store_mesh(const int8_t slot);
@ -98,7 +98,7 @@ class MarlinSettings {
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled // That can store is enabled
static constexpr int16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always static constexpr uint16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
// live at the very end of the eeprom // live at the very end of the eeprom
#endif #endif

Loading…
Cancel
Save