Fix and improve Power Monitor (#21551)

This commit is contained in:
gmarsh
2021-04-13 17:17:52 -03:00
committed by GitHub
parent 84c79d7531
commit a5f0075a60
8 changed files with 37 additions and 36 deletions

View File

@ -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