Refactor PRINTER_EVENT_LEDS, apply to M303 (#12038)
Co-Authored-By: Giuliano Zaro <gmagician@users.noreply.github.com>
This commit is contained in:
committed by
Scott Lahteine
parent
d8d76cd2ba
commit
d43d4e4219
@ -33,9 +33,8 @@
|
||||
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
#if ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT)
|
||||
bool GcodeSuite::lights_off_after_print;
|
||||
#include "../../feature/leds/leds.h"
|
||||
#if HAS_LEDS_OFF_FLAG
|
||||
#include "../../feature/leds/printer_event_leds.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -90,11 +89,8 @@ void GcodeSuite::M0_M1() {
|
||||
else
|
||||
while (wait_for_user) idle();
|
||||
|
||||
#if ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT)
|
||||
if (lights_off_after_print) {
|
||||
leds.set_off();
|
||||
lights_off_after_print = false;
|
||||
}
|
||||
#if HAS_LEDS_OFF_FLAG
|
||||
printerEventLEDs.onResumeAfterWait();
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
|
Reference in New Issue
Block a user