From f1f71ef605ef860ac771ff84d9cd7c219eda0ad5 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 3 Dec 2014 14:33:06 +0900 Subject: [PATCH] Copter: cli uses has_current method --- ArduCopter/setup.pde | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ArduCopter/setup.pde b/ArduCopter/setup.pde index 009b673e2f..ace519df84 100644 --- a/ArduCopter/setup.pde +++ b/ArduCopter/setup.pde @@ -322,9 +322,13 @@ static void report_batt_monitor() { cliSerial->printf_P(PSTR("\nBatt Mon:\n")); print_divider(); - if (battery.monitoring() == AP_BATT_MONITOR_DISABLED) print_enabled(false); - if (battery.monitoring() == AP_BATT_MONITOR_VOLTAGE_ONLY) cliSerial->printf_P(PSTR("volts")); - if (battery.monitoring() == AP_BATT_MONITOR_VOLTAGE_AND_CURRENT) cliSerial->printf_P(PSTR("volts and cur")); + if (battery.num_instances() == 0) { + print_enabled(false); + } else if (!battery.has_current()) { + cliSerial->printf_P(PSTR("volts")); + } else { + cliSerial->printf_P(PSTR("volts and cur")); + } print_blanks(2); }