Skip to content
Snippets Groups Projects
Commit af336603 authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Merge pull request #853 from PX4/hil_batt_fix

commander: Also publish battery status in HIL, since we have a fake batt...
parents 20f20d54 a0c92270
No related branches found
No related tags found
No related merge requests found
......@@ -967,7 +967,7 @@ int commander_thread_main(int argc, char *argv[])
orb_copy(ORB_ID(battery_status), battery_sub, &battery);
/* only consider battery voltage if system has been running 2s and battery voltage is valid */
if (status.hil_state == HIL_STATE_OFF && hrt_absolute_time() > start_time + 2000000 && battery.voltage_filtered_v > 0.0f) {
if (hrt_absolute_time() > start_time + 2000000 && battery.voltage_filtered_v > 0.0f) {
status.battery_voltage = battery.voltage_filtered_v;
status.battery_current = battery.current_a;
status.condition_battery_voltage_valid = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment