Disable M851 and zprobe_zoffset (rethink usage)

This commit is contained in:
Ted Hess 2018-02-20 11:38:40 -05:00
parent 2533c36496
commit 877441cc73
4 changed files with 16 additions and 4 deletions

View File

@ -469,7 +469,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
//===========================================================================
// Custom M code points
#define CUSTOM_M_CODES
//#define CUSTOM_M_CODES
#ifdef CUSTOM_M_CODES
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
#define Z_PROBE_OFFSET_RANGE_MIN -15

View File

@ -85,7 +85,11 @@ void Config_StoreSettings()
EEPROM_WRITE_VAR(i,absPreheatFanSpeed);
*/
EEPROM_WRITE_VAR(i,zprobe_zoffset);
#ifdef ENABLE_AUTO_BED_LEVELING
EEPROM_WRITE_VAR(i,zprobe_zoffset);
#else
i += sizeof(float);
#endif
#ifdef PIDTEMP
EEPROM_WRITE_VAR(i,Kp);
EEPROM_WRITE_VAR(i,Ki);
@ -314,8 +318,11 @@ bool Config_RetrieveSettings()
EEPROM_READ_VAR(i,absPreheatFanSpeed);
*/
EEPROM_READ_VAR(i,zprobe_zoffset);
#ifdef ENABLE_AUTO_BED_LEVELING
EEPROM_READ_VAR(i,zprobe_zoffset);
#else
i += sizeof(float);
#endif
#ifndef PIDTEMP
float Kp,Ki,Kd;
#endif

View File

@ -258,7 +258,9 @@ extern float add_homing[3];
extern float min_pos[3];
extern float max_pos[3];
extern bool axis_known_position[3];
#ifdef ENABLE_AUTO_BED_LEVELING
extern float zprobe_zoffset;
#endif
extern int fanSpeed;
extern void homeaxis(int axis);

View File

@ -319,7 +319,10 @@ float add_homing[3]={0,0,0};
float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
bool axis_known_position[3] = {false, false, false};
#ifdef ENABLE_AUTO_BED_LEVELING
float zprobe_zoffset;
#endif
// Extruder offset
#if EXTRUDERS > 1