Move altfan eeprom initialization to extruder_altfan_detect()

flash: -16B
RAM: 0B
This commit is contained in:
Alex Voinea 2023-01-21 22:34:33 +01:00 committed by Guðni Már Gilbert
parent 7245c76094
commit 53fb4c3e3f
2 changed files with 1 additions and 4 deletions

View File

@ -1255,9 +1255,6 @@ void setup()
temp_mgr_init();
#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: "));
if (extruder_altfan_detect())
SERIAL_ECHOLNRPGM(PSTR("ALTFAN"));

View File

@ -166,7 +166,7 @@ bool extruder_altfan_detect()
altfanStatus.isAltfan = 0;
// 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);
SET_INPUT(TACH_0);