commander: Also publish battery status in HIL, since we have a fake battery available and the system freaks out without knowing its main supply

This commit is contained in:
Lorenz Meier 2014-04-22 01:38:15 +02:00
parent 20f20d54b0
commit a0c9227044
1 changed files with 1 additions and 1 deletions

View File

@ -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;