Skip to content

Commit

Permalink
Client: Update battery status format
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Nov 1, 2019
1 parent 1053ffe commit e50b336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Drone/copter_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def telemetry_loop():
batt_empty = batt_empty_param.value.real
batt_charged = batt_charged_param.value.real
batt_cells = batt_cells_param.value.integer
telemetry = telemetry._replace(battery_p = '{:.2f}'.format(min((ros_telemetry.voltage/batt_cells - batt_empty)/(batt_charged - batt_empty)*100., 100)))
telemetry = telemetry._replace(battery_p = '{}'.format(int(min((ros_telemetry.voltage/batt_cells - batt_empty)/(batt_charged - batt_empty)*100., 100))))
else:
telemetry = telemetry._replace(battery_p = 'nan')
telemetry = telemetry._replace(calibration_status = get_calibration_status())
Expand Down

0 comments on commit e50b336

Please sign in to comment.