2020-06-18 15:23:03 -05:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-11-29 20:49:42 -06:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2020-06-18 15:23:03 -05:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2020-11-29 20:49:42 -06:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2020-06-18 15:23:03 -05:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2020-07-22 22:20:14 -05:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2020-06-18 15:23:03 -05:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
//
|
|
|
|
// Power Monitor Menu
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "../../inc/MarlinConfigPre.h"
|
|
|
|
|
|
|
|
#if HAS_LCD_MENU && HAS_POWER_MONITOR
|
|
|
|
|
2020-08-21 05:21:34 -05:00
|
|
|
#include "menu_item.h"
|
2020-06-18 15:23:03 -05:00
|
|
|
#include "../../feature/power_monitor.h"
|
|
|
|
|
|
|
|
void menu_power_monitor() {
|
|
|
|
START_MENU();
|
2020-07-06 18:53:26 -05:00
|
|
|
BACK_ITEM(MSG_MAIN);
|
2020-06-18 15:23:03 -05:00
|
|
|
|
|
|
|
#if ENABLED(POWER_MONITOR_CURRENT)
|
|
|
|
{
|
|
|
|
bool ena = power_monitor.current_display_enabled();
|
2020-07-06 18:53:26 -05:00
|
|
|
EDIT_ITEM(bool, MSG_CURRENT, &ena, power_monitor.toggle_current_display);
|
2020-06-18 15:23:03 -05:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAS_POWER_MONITOR_VREF
|
|
|
|
{
|
|
|
|
bool ena = power_monitor.voltage_display_enabled();
|
2020-07-06 18:53:26 -05:00
|
|
|
EDIT_ITEM(bool, MSG_VOLTAGE, &ena, power_monitor.toggle_voltage_display);
|
2020-06-18 15:23:03 -05:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAS_POWER_MONITOR_WATTS
|
|
|
|
{
|
|
|
|
bool ena = power_monitor.power_display_enabled();
|
2020-07-06 18:53:26 -05:00
|
|
|
EDIT_ITEM(bool, MSG_POWER, &ena, power_monitor.toggle_power_display);
|
2020-06-18 15:23:03 -05:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // HAS_LCD_MENU && HAS_POWER_MONITOR
|