Update and fix POWER_MONITOR (#18561)

This commit is contained in:
ellensp
2020-07-07 11:53:26 +12:00
committed by GitHub
parent ea8c3a9388
commit 12e7106a8a
8 changed files with 28 additions and 20 deletions

View File

@ -33,26 +33,26 @@
void menu_power_monitor() {
START_MENU();
MENU_BACK(MSG_MAIN);
BACK_ITEM(MSG_MAIN);
#if ENABLED(POWER_MONITOR_CURRENT)
{
bool ena = power_monitor.current_display_enabled();
MENU_ITEM_EDIT_CALLBACK(bool, MSG_CURRENT, &ena, power_monitor.toggle_current_display);
EDIT_ITEM(bool, MSG_CURRENT, &ena, power_monitor.toggle_current_display);
}
#endif
#if HAS_POWER_MONITOR_VREF
{
bool ena = power_monitor.voltage_display_enabled();
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLTAGE, &ena, power_monitor.toggle_voltage_display);
EDIT_ITEM(bool, MSG_VOLTAGE, &ena, power_monitor.toggle_voltage_display);
}
#endif
#if HAS_POWER_MONITOR_WATTS
{
bool ena = power_monitor.power_display_enabled();
MENU_ITEM_EDIT_CALLBACK(bool, MSG_POWER, &ena, power_monitor.toggle_power_display);
EDIT_ITEM(bool, MSG_POWER, &ena, power_monitor.toggle_power_display);
}
#endif