mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 04:10:36 +08:00
battery: pass connected flag in by setter
This commit is contained in:
@@ -99,7 +99,8 @@ void BatterySimulator::Run()
|
||||
float vbatt = math::gradual(_battery_percentage, 0.f, 1.f, _battery.empty_cell_voltage(), _battery.full_cell_voltage());
|
||||
vbatt *= _battery.cell_count();
|
||||
|
||||
_battery.updateBatteryStatus(now_us, vbatt, ibatt, true);
|
||||
_battery.setConnected(true);
|
||||
_battery.updateBatteryStatus(now_us, vbatt, ibatt);
|
||||
|
||||
perf_end(_loop_perf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user