Move some MarlinCore and MarlinUI code (#20832)

This commit is contained in:
Scott Lahteine
2021-01-21 03:40:07 -06:00
committed by GitHub
parent ac82dc418a
commit c0870d417a
38 changed files with 178 additions and 206 deletions

View File

@@ -118,9 +118,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
// Give the response a chance to update its counter.
static inline void run() {
if ( enabled && !filament_ran_out
&& (printingIsActive() || TERN0(ADVANCED_PAUSE_FEATURE, did_pause_print))
) {
if (enabled && !filament_ran_out && (printingIsActive() || did_pause_print)) {
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, cli()); // Prevent RunoutResponseDelayed::block_completed from accumulating here
response.run();
sensor.run();
@@ -343,9 +341,7 @@ class FilamentSensorBase {
}
static inline void block_completed(const block_t* const b) {
if (b->steps.x || b->steps.y || b->steps.z
|| TERN0(ADVANCED_PAUSE_FEATURE, did_pause_print) // Allow pause purge move to re-trigger runout state
) {
if (b->steps.x || b->steps.y || b->steps.z || did_pause_print) { // Allow pause purge move to re-trigger runout state
// Only trigger on extrusion with XYZ movement to allow filament change and retract/recover.
const uint8_t e = b->extruder;
const int32_t steps = b->steps.e;