Remove unused LoadingToNozzleRAII
The variable is not used anywhere. Change in memory: Flash: -14 bytes SRAM: -1 byte
This commit is contained in:
parent
01df65882f
commit
4b54cd1f30
|
|
@ -49,7 +49,6 @@ MMU2::MMU2()
|
||||||
, mmu_print_saved(SavedState::None)
|
, mmu_print_saved(SavedState::None)
|
||||||
, loadFilamentStarted(false)
|
, loadFilamentStarted(false)
|
||||||
, unloadFilamentStarted(false)
|
, unloadFilamentStarted(false)
|
||||||
, loadingToNozzle(false)
|
|
||||||
, toolchange_counter(0)
|
, toolchange_counter(0)
|
||||||
, tmcFailures(0) {
|
, tmcFailures(0) {
|
||||||
}
|
}
|
||||||
|
|
@ -534,23 +533,10 @@ bool MMU2::load_filament(uint8_t slot) {
|
||||||
return true;
|
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) {
|
bool MMU2::load_filament_to_nozzle(uint8_t slot) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
LoadingToNozzleRAII ln(*this);
|
|
||||||
|
|
||||||
WaitForHotendTargetTempBeep();
|
WaitForHotendTargetTempBeep();
|
||||||
|
|
||||||
FullScreenMsgLoad(slot);
|
FullScreenMsgLoad(slot);
|
||||||
|
|
|
||||||
|
|
@ -307,10 +307,6 @@ private:
|
||||||
bool loadFilamentStarted;
|
bool loadFilamentStarted;
|
||||||
bool unloadFilamentStarted;
|
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 toolchange_counter;
|
||||||
uint16_t tmcFailures;
|
uint16_t tmcFailures;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue