added contrast control function for gLCDs
This commit is contained in:
@ -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 "V07"
|
||||
#define EEPROM_VERSION "V08"
|
||||
|
||||
#ifdef EEPROM_SETTINGS
|
||||
void Config_StoreSettings()
|
||||
@ -78,6 +78,10 @@ void Config_StoreSettings()
|
||||
EEPROM_WRITE_VAR(i,dummy);
|
||||
EEPROM_WRITE_VAR(i,dummy);
|
||||
#endif
|
||||
#ifndef DOGLCD
|
||||
int lcd_contrast = 32;
|
||||
#endif
|
||||
EEPROM_WRITE_VAR(i,lcd_contrast);
|
||||
char ver2[4]=EEPROM_VERSION;
|
||||
i=EEPROM_OFFSET;
|
||||
EEPROM_WRITE_VAR(i,ver2); // validate data
|
||||
@ -198,6 +202,10 @@ void Config_RetrieveSettings()
|
||||
EEPROM_READ_VAR(i,Kp);
|
||||
EEPROM_READ_VAR(i,Ki);
|
||||
EEPROM_READ_VAR(i,Kd);
|
||||
#ifndef DOGLCD
|
||||
int lcd_contrast;
|
||||
#endif
|
||||
EEPROM_READ_VAR(i,lcd_contrast);
|
||||
|
||||
// Call updatePID (similar to when we have processed M301)
|
||||
updatePID();
|
||||
@ -244,6 +252,9 @@ void Config_ResetDefault()
|
||||
absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
|
||||
absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
|
||||
#endif
|
||||
#ifdef DOGLCD
|
||||
lcd_contrast = DEFAULT_LCD_CONTRAST;
|
||||
#endif
|
||||
#ifdef PIDTEMP
|
||||
Kp = DEFAULT_Kp;
|
||||
Ki = scalePID_i(DEFAULT_Ki);
|
||||
|
Reference in New Issue
Block a user