Remove unused LoadingToNozzleRAII

The variable is not used anywhere.

Change in memory:
Flash: -14 bytes
SRAM: -1 byte
This commit is contained in:
Guðni Már Gilbert 2023-04-16 15:38:06 +00:00
parent 01df65882f
commit 4b54cd1f30
2 changed files with 0 additions and 18 deletions

View File

@ -49,7 +49,6 @@ MMU2::MMU2()
, mmu_print_saved(SavedState::None)
, loadFilamentStarted(false)
, unloadFilamentStarted(false)
, loadingToNozzle(false)
, toolchange_counter(0)
, tmcFailures(0) {
}
@ -534,23 +533,10 @@ bool MMU2::load_filament(uint8_t slot) {
return true;
}
struct LoadingToNozzleRAII {
MMU2 &mmu2;
explicit inline LoadingToNozzleRAII(MMU2 &mmu2)
: mmu2(mmu2) {
mmu2.loadingToNozzle = true;
}
inline ~LoadingToNozzleRAII() {
mmu2.loadingToNozzle = false;
}
};
bool MMU2::load_filament_to_nozzle(uint8_t slot) {
if (!WaitForMMUReady())
return false;
LoadingToNozzleRAII ln(*this);
WaitForHotendTargetTempBeep();
FullScreenMsgLoad(slot);

View File

@ -307,10 +307,6 @@ private:
bool loadFilamentStarted;
bool unloadFilamentStarted;
friend struct LoadingToNozzleRAII;
/// true in case we are doing the LoadToNozzle operation - that means the filament shall be loaded all the way down to the nozzle
/// unlike the mid-print ToolChange commands, which only load the first ~30mm and then the G-code takes over.
bool loadingToNozzle;
uint16_t toolchange_counter;
uint16_t tmcFailures;
};