diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-22 01:39:12 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-22 01:39:12 +0200 |
commit | af336603517a32b86481c5f57d9be51657eb3f0d (patch) | |
tree | b17f0a2298a3170b279395d3efc99c411f26bd87 /src/modules | |
parent | 20f20d54b0eb233d2d504fb59be9644e4b9ebada (diff) | |
parent | a0c922704457b540b236f1c72ed5630662da9d9e (diff) | |
download | px4-firmware-af336603517a32b86481c5f57d9be51657eb3f0d.tar.gz px4-firmware-af336603517a32b86481c5f57d9be51657eb3f0d.tar.bz2 px4-firmware-af336603517a32b86481c5f57d9be51657eb3f0d.zip |
Merge pull request #853 from PX4/hil_batt_fix
commander: Also publish battery status in HIL, since we have a fake batt...
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/commander/commander.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index ce6de88ef..819dfbe83 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -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; |