mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-30 14:59:31 +00:00
simple_offboard: don’t fall if no cell voltage
This commit is contained in:
@@ -416,7 +416,10 @@ def get_telemetry(req):
|
||||
|
||||
if battery:
|
||||
res['voltage'] = battery.voltage
|
||||
res['cell_voltage'] = battery.cell_voltage[0]
|
||||
try:
|
||||
res['cell_voltage'] = battery.cell_voltage[0]
|
||||
except:
|
||||
pass
|
||||
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user