Add Z Probe Offset to EEPROM and Ultra LCD

This commit is contained in:
Alex Borro
2014-01-16 18:13:46 -02:00
parent df194f75e1
commit 05932e4458
5 changed files with 97 additions and 81 deletions

View File

@ -37,7 +37,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
// the default values are used whenever there is a change to the data, to prevent
// wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#define EEPROM_VERSION "V09"
#define EEPROM_VERSION "V10"
#ifdef EEPROM_SETTINGS
void Config_StoreSettings()
@ -70,6 +70,7 @@ void Config_StoreSettings()
EEPROM_WRITE_VAR(i,absPreheatHotendTemp);
EEPROM_WRITE_VAR(i,absPreheatHPBTemp);
EEPROM_WRITE_VAR(i,absPreheatFanSpeed);
EEPROM_WRITE_VAR(i,zprobe_zoffset);
#ifdef PIDTEMP
EEPROM_WRITE_VAR(i,Kp);
EEPROM_WRITE_VAR(i,Ki);
@ -210,6 +211,7 @@ void Config_RetrieveSettings()
EEPROM_READ_VAR(i,absPreheatHotendTemp);
EEPROM_READ_VAR(i,absPreheatHPBTemp);
EEPROM_READ_VAR(i,absPreheatFanSpeed);
EEPROM_READ_VAR(i,zprobe_zoffset);
#ifndef PIDTEMP
float Kp,Ki,Kd;
#endif
@ -272,6 +274,7 @@ void Config_ResetDefault()
absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
#endif
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
#ifdef DOGLCD
lcd_contrast = DEFAULT_LCD_CONTRAST;
#endif