Optimisation: Move filAutoLoad to ultralcd
We can reuse preheat_or_continue() function Change in memory: Flash: -22 bytes SRAM: 0 bytes
This commit is contained in:
parent
1b9379b328
commit
301b2e4384
|
|
@ -117,7 +117,7 @@ void Filament_sensor::triggerFilamentInserted() {
|
||||||
|| eeprom_read_byte((uint8_t *)EEPROM_WIZARD_ACTIVE)
|
|| eeprom_read_byte((uint8_t *)EEPROM_WIZARD_ACTIVE)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
filAutoLoad();
|
lcd_AutoLoadFilament();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,16 +141,6 @@ void Filament_sensor::triggerFilamentRemoved() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Filament_sensor::filAutoLoad() {
|
|
||||||
eFilamentAction = FilamentAction::AutoLoad;
|
|
||||||
if (target_temperature[0] >= EXTRUDE_MINTEMP) {
|
|
||||||
bFilamentPreheatState = true;
|
|
||||||
menu_submenu(mFilamentItemForce);
|
|
||||||
} else {
|
|
||||||
menu_submenu(lcd_generic_preheat_menu);
|
|
||||||
lcd_timeoutToStatus.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Filament_sensor::filRunout() {
|
void Filament_sensor::filRunout() {
|
||||||
// SERIAL_ECHOLNPGM("filRunout");
|
// SERIAL_ECHOLNPGM("filRunout");
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,6 @@ protected:
|
||||||
|
|
||||||
void triggerFilamentRemoved();
|
void triggerFilamentRemoved();
|
||||||
|
|
||||||
static void filAutoLoad();
|
|
||||||
|
|
||||||
void filRunout();
|
void filRunout();
|
||||||
|
|
||||||
void triggerError();
|
void triggerError();
|
||||||
|
|
|
||||||
|
|
@ -2302,6 +2302,11 @@ static void lcd_LoadFilament()
|
||||||
preheat_or_continue();
|
preheat_or_continue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lcd_AutoLoadFilament() {
|
||||||
|
eFilamentAction = FilamentAction::AutoLoad;
|
||||||
|
preheat_or_continue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! @brief Show filament used a print time
|
//! @brief Show filament used a print time
|
||||||
//!
|
//!
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,7 @@ void mFilamentItem(uint16_t nTemp,uint16_t nTempBed);
|
||||||
void mFilamentItemForce();
|
void mFilamentItemForce();
|
||||||
void lcd_generic_preheat_menu();
|
void lcd_generic_preheat_menu();
|
||||||
void unload_filament(float unloadLength);
|
void unload_filament(float unloadLength);
|
||||||
|
void lcd_AutoLoadFilament();
|
||||||
|
|
||||||
|
|
||||||
void lcd_wait_for_heater();
|
void lcd_wait_for_heater();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue