Fix and improve Power Monitor (#21551)

This commit is contained in:
gmarsh authored and GitHub committed 2021-04-13 15:17:52 -05:00
1 parent 84c79d7531
commit a5f0075a60
8 files changed
+37 -36

No files matched your search

@@ -42,7 +42,7 @@ void GcodeSuite::M430() {
#if ENABLED(POWER_MONITOR_CURRENT)
if (parser.seen('I')) { power_monitor.set_current_display(parser.value_bool()); do_report = false; }
#endif
#if HAS_POWER_MONITOR_VREF
#if ENABLED(POWER_MONITOR_VOLTAGE)
if (parser.seen('V')) { power_monitor.set_voltage_display(parser.value_bool()); do_report = false; }
#endif
#if HAS_POWER_MONITOR_WATTS
@@ -53,11 +53,11 @@ void GcodeSuite::M430() {
SERIAL_ECHOLNPAIR(
#if ENABLED(POWER_MONITOR_CURRENT)
"Current: ", power_monitor.getAmps(), "A"
#if HAS_POWER_MONITOR_VREF
#if ENABLED(POWER_MONITOR_VOLTAGE)
" "
#endif
#endif
#if HAS_POWER_MONITOR_VREF
#if ENABLED(POWER_MONITOR_VOLTAGE)
"Voltage: ", power_monitor.getVolts(), "V"
#endif
#if HAS_POWER_MONITOR_WATTS