diff --git a/MAVProxy/modules/mavproxy_battery.py b/MAVProxy/modules/mavproxy_battery.py index dcc8cafd17..66ef575781 100644 --- a/MAVProxy/modules/mavproxy_battery.py +++ b/MAVProxy/modules/mavproxy_battery.py @@ -51,6 +51,9 @@ def numcells(self, id): def cmd_bat(self, args): '''show battery levels''' + if 0 not in self.battery_level: + print("No battery information") + return print("Flight battery: %u%%" % self.battery_level[0]) for id in range(9): if self.numcells(id) != 0 and id in self.voltage_level: