♻️ Consolidate PSU_CONTROL (#22304)
This commit is contained in:
committed by
GitHub
parent
37cf94b888
commit
c8ee056cc6
@@ -30,6 +30,10 @@
|
||||
|
||||
#include "menu_item.h"
|
||||
|
||||
#if ENABLED(PSU_CONTROL)
|
||||
#include "../../feature/power.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LED_CONTROL_MENU)
|
||||
#include "../../feature/leds/leds.h"
|
||||
|
||||
@@ -125,12 +129,7 @@ void menu_led() {
|
||||
BACK_ITEM(MSG_MAIN);
|
||||
|
||||
#if ENABLED(LED_CONTROL_MENU)
|
||||
#if ENABLED(PSU_CONTROL)
|
||||
extern bool powersupply_on;
|
||||
#else
|
||||
constexpr bool powersupply_on = true;
|
||||
#endif
|
||||
if (powersupply_on) {
|
||||
if (TERN1(PSU_CONTROL, powerManager.psu_on)) {
|
||||
editable.state = leds.lights_on;
|
||||
EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user