Move altfan eeprom initialization to extruder_altfan_detect()
flash: -16B RAM: 0B
This commit is contained in:
parent
7245c76094
commit
53fb4c3e3f
|
|
@ -1255,9 +1255,6 @@ void setup()
|
||||||
temp_mgr_init();
|
temp_mgr_init();
|
||||||
|
|
||||||
#ifdef EXTRUDER_ALTFAN_DETECT
|
#ifdef EXTRUDER_ALTFAN_DETECT
|
||||||
if (eeprom_read_byte((uint8_t*)EEPROM_ALTFAN_OVERRIDE) == EEPROM_EMPTY_VALUE) {
|
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_ALTFAN_OVERRIDE, 0);
|
|
||||||
}
|
|
||||||
SERIAL_ECHORPGM(_n("Hotend fan type: "));
|
SERIAL_ECHORPGM(_n("Hotend fan type: "));
|
||||||
if (extruder_altfan_detect())
|
if (extruder_altfan_detect())
|
||||||
SERIAL_ECHOLNRPGM(PSTR("ALTFAN"));
|
SERIAL_ECHOLNRPGM(PSTR("ALTFAN"));
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ bool extruder_altfan_detect()
|
||||||
altfanStatus.isAltfan = 0;
|
altfanStatus.isAltfan = 0;
|
||||||
|
|
||||||
// During initialisation, use the EEPROM value
|
// During initialisation, use the EEPROM value
|
||||||
altfanStatus.altfanOverride = eeprom_read_byte((uint8_t *)EEPROM_ALTFAN_OVERRIDE);
|
altfanStatus.altfanOverride = eeprom_init_default_byte((uint8_t*)EEPROM_ALTFAN_OVERRIDE, 0);
|
||||||
setExtruderAutoFanState(3);
|
setExtruderAutoFanState(3);
|
||||||
|
|
||||||
SET_INPUT(TACH_0);
|
SET_INPUT(TACH_0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue