SITL: SIM_Battery: provde dt in voltage filter apply function

This commit is contained in:
Iampete1 2024-07-27 13:14:34 +01:00 committed by Andrew Tridgell
parent e97569db8c
commit ee8a8f0254
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ void Battery::set_current(float current)
voltage = get_resting_voltage(100 * remaining_Ah / capacity_Ah) - voltage_delta; voltage = get_resting_voltage(100 * remaining_Ah / capacity_Ah) - voltage_delta;
} }
voltage_filter.apply(voltage); voltage_filter.apply(voltage, dt);
{ {
const uint64_t temperature_dt = now - temperature.last_update_micros; const uint64_t temperature_dt = now - temperature.last_update_micros;