Don't raise MMU error screen until retry is done
Change in memory: Flash: +8 bytes SRAM: 0 bytes
This commit is contained in:
parent
853c2ad6e9
commit
738dc511ee
|
|
@ -221,14 +221,14 @@ void MMU2::mmu_loop() {
|
|||
return;
|
||||
avoidRecursion = true;
|
||||
|
||||
mmu_loop_inner();
|
||||
mmu_loop_inner(true);
|
||||
|
||||
avoidRecursion = false;
|
||||
}
|
||||
|
||||
void MMU2::mmu_loop_inner()
|
||||
void __attribute__((noinline)) MMU2::mmu_loop_inner(bool reportErrors)
|
||||
{
|
||||
logicStepLastStatus = LogicStep(); // it looks like the mmu_loop doesn't need to be a blocking call
|
||||
logicStepLastStatus = LogicStep(reportErrors); // it looks like the mmu_loop doesn't need to be a blocking call
|
||||
|
||||
if (is_mmu_error_monitor_active){
|
||||
// Call this every iteration to keep the knob rotation responsive
|
||||
|
|
@ -637,7 +637,7 @@ void MMU2::ResumeHotendTemp() {
|
|||
ReportErrorHookSensorLineRender();
|
||||
waitForHotendTargetTemp(100, []{
|
||||
manage_inactivity(true);
|
||||
mmu2.mmu_loop_inner();
|
||||
mmu2.mmu_loop_inner(false);
|
||||
ReportErrorHookDynamicRender();
|
||||
});
|
||||
lcd_update_enable(true); // temporary hack to stop this locking the printer...
|
||||
|
|
@ -768,7 +768,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
|||
}
|
||||
}
|
||||
|
||||
StepStatus MMU2::LogicStep() {
|
||||
StepStatus MMU2::LogicStep(bool reportErrors) {
|
||||
CheckUserInput(); // Process any buttons before proceeding with another MMU Query
|
||||
StepStatus ss = logic.Step();
|
||||
switch (ss) {
|
||||
|
|
@ -779,6 +779,15 @@ StepStatus MMU2::LogicStep() {
|
|||
case Processing:
|
||||
OnMMUProgressMsg(logic.Progress());
|
||||
break;
|
||||
case ButtonPushed:
|
||||
lastButton = logic.Button();
|
||||
LogEchoEvent_P(PSTR("MMU Button pushed"));
|
||||
CheckUserInput(); // Process the button immediately
|
||||
break;
|
||||
default:
|
||||
if(reportErrors) {
|
||||
switch (ss)
|
||||
{
|
||||
case CommandError:
|
||||
ReportError(logic.Error(), ErrorSourceMMU);
|
||||
break;
|
||||
|
|
@ -794,14 +803,11 @@ StepStatus MMU2::LogicStep() {
|
|||
StopKeepPowered();
|
||||
ReportError(ErrorCode::VERSION_MISMATCH, ErrorSourcePrinter);
|
||||
break;
|
||||
case ButtonPushed:
|
||||
lastButton = logic.Button();
|
||||
LogEchoEvent_P(PSTR("MMU Button pushed"));
|
||||
CheckUserInput(); // Process the button immediately
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( logic.Running() ){
|
||||
state = xState::Active;
|
||||
|
|
|
|||
|
|
@ -229,12 +229,14 @@ private:
|
|||
|
||||
/// The inner private implementation of mmu_loop()
|
||||
/// which is NOT (!!!) recursion-guarded. Use caution - but we do need it during waiting for hotend resume to keep comms alive!
|
||||
void mmu_loop_inner();
|
||||
/// @param reportErrors true if Errors should raise MMU Error screen, false otherwise
|
||||
void mmu_loop_inner(bool reportErrors);
|
||||
|
||||
/// Performs one step of the protocol logic state machine
|
||||
/// and reports progress and errors if needed to attached ExtUIs.
|
||||
/// Updates the global state of MMU (Active/Connecting/Stopped) at runtime, see @ref State
|
||||
StepStatus LogicStep();
|
||||
/// @param reportErrors true if Errors should raise MMU Error screen, false otherwise
|
||||
StepStatus LogicStep(bool reportErrors);
|
||||
|
||||
void filament_ramming();
|
||||
void execute_extruder_sequence(const E_Step *sequence, uint8_t steps);
|
||||
|
|
|
|||
Loading…
Reference in New Issue