From ee8a8f0254b0e09b9abe10f1f70660d23c754f74 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Sat, 27 Jul 2024 13:14:34 +0100 Subject: [PATCH] SITL: SIM_Battery: provde dt in voltage filter apply function --- libraries/SITL/SIM_Battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SITL/SIM_Battery.cpp b/libraries/SITL/SIM_Battery.cpp index d5a7219c36..4c94bd3051 100644 --- a/libraries/SITL/SIM_Battery.cpp +++ b/libraries/SITL/SIM_Battery.cpp @@ -149,7 +149,7 @@ void Battery::set_current(float current) 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;