[1.1.x] BLTouch 3.0 - 3.1 (#14839)
This commit is contained in:
committed by
Scott Lahteine
parent
fdd2316691
commit
93f9209dbb
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
// Change EEPROM version if the structure changes
|
||||
#define EEPROM_VERSION "V55"
|
||||
#define EEPROM_VERSION "V56"
|
||||
#define EEPROM_OFFSET 100
|
||||
|
||||
// Check the integrity of data offsets.
|
||||
@@ -77,6 +77,10 @@
|
||||
#define LPQ_LEN thermalManager.lpq_len
|
||||
#endif
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
extern bool bltouch_last_written_mode;
|
||||
#endif
|
||||
|
||||
#pragma pack(push, 1) // No padding between variables
|
||||
|
||||
typedef struct PID { float Kp, Ki, Kd; } PID;
|
||||
@@ -159,6 +163,11 @@ typedef struct SettingsDataStruct {
|
||||
bool planner_leveling_active; // M420 S planner.leveling_active
|
||||
int8_t ubl_storage_slot; // ubl.storage_slot
|
||||
|
||||
//
|
||||
// BLTOUCH
|
||||
//
|
||||
bool bltouch_last_written_mode;
|
||||
|
||||
//
|
||||
// DELTA / [XYZ]_DUAL_ENDSTOPS
|
||||
//
|
||||
@@ -573,6 +582,20 @@ void MarlinSettings::postprocess() {
|
||||
EEPROM_WRITE(storage_slot);
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
|
||||
//
|
||||
// BLTOUCH
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(bltouch_last_written_mode);
|
||||
#if ENABLED(BLTOUCH)
|
||||
const bool &eeprom_bltouch_last_written_mode = bltouch_last_written_mode;
|
||||
#else
|
||||
constexpr bool eeprom_bltouch_last_written_mode = false;
|
||||
#endif
|
||||
EEPROM_WRITE(eeprom_bltouch_last_written_mode);
|
||||
}
|
||||
|
||||
|
||||
// 11 floats for DELTA / [XYZ]_DUAL_ENDSTOPS
|
||||
#if ENABLED(DELTA)
|
||||
|
||||
@@ -1191,6 +1214,19 @@ void MarlinSettings::postprocess() {
|
||||
EEPROM_READ(dummyui8);
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
|
||||
//
|
||||
// BLTOUCH
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(bltouch_last_written_mode);
|
||||
#if ENABLED(BLTOUCH)
|
||||
bool &eeprom_bltouch_last_written_mode = bltouch_last_written_mode;
|
||||
#else
|
||||
bool eeprom_bltouch_last_written_mode;
|
||||
#endif
|
||||
EEPROM_READ(eeprom_bltouch_last_written_mode);
|
||||
}
|
||||
|
||||
//
|
||||
// DELTA Geometry or Dual Endstops offsets
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user