Fuel average is supposed to show the average when car is in motion.
Glancing at the code, it appears I've missed out the check for updating "fuel_used_motion_ul`. It should only update when vehicle speed is greater than 0.
So presumably both fuel_used_motion_ul and fuel_used_total_ul come out to same value.
Fix by adding a check to only update fuel_used_motion_ul when VSS > 0. fuel_used_total_ul is for total fuel use, fuel_used_motion_ul is for fuel used when moving and is what's used for fuel average calculation.
Fuel average is supposed to show the average when car is in motion.
Glancing at the code, it appears I've missed out the check for updating "fuel_used_motion_ul`. It should only update when vehicle speed is greater than 0.
So presumably both
fuel_used_motion_ulandfuel_used_total_ulcome out to same value.Fix by adding a check to only update
fuel_used_motion_ulwhen VSS > 0.fuel_used_total_ulis for total fuel use,fuel_used_motion_ulis for fuel used when moving and is what's used for fuel average calculation.