From 24b18ad9eed8270f89a9df549a489f71d2972fdb Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 28 Mar 2021 05:01:08 -0700 Subject: [PATCH] slow down fuel level (#2505) --- firmware/init/sensor/init_fuel_level.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/init/sensor/init_fuel_level.cpp b/firmware/init/sensor/init_fuel_level.cpp index 6c4041c84a..b11ef7a2ce 100644 --- a/firmware/init/sensor/init_fuel_level.cpp +++ b/firmware/init/sensor/init_fuel_level.cpp @@ -30,7 +30,9 @@ void initFuelLevel(DECLARE_CONFIG_PARAMETER_SIGNATURE) { } fuelSensor.setFunction(fuelCurve); - AdcSubscription::SubscribeSensor(fuelSensor, channel, /*lowpassCutoff =*/ 1); + + // Filtering with such a small bandwidth helps prevent noisy data from fuel tank slosh + AdcSubscription::SubscribeSensor(fuelSensor, channel, /*lowpassCutoff =*/ 0.05f); fuelSensor.Register(); } #endif // ! EFI_UNIT_TEST