From 6b1beb6e96126edd51afdf105e4618f38fe4c044 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 2 Oct 2024 15:23:39 -0700 Subject: [PATCH] verify fuel level bins are ascending --- firmware/controllers/engine_controller.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 60faeedd14..8711b1b85f 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -553,6 +553,10 @@ bool validateConfig() { ensureArrayIsAscending("MAF transfer function", config->mafDecodingBins); + if (isAdcChannelValid(engineConfiguration->fuelLevelSensor)) { + ensureArrayIsAscending("Fuel level curve", config->fuelLevelBins); + } + // Cranking tables ensureArrayIsAscending("Cranking fuel mult", config->crankingFuelBins); ensureArrayIsAscending("Cranking duration", config->crankingCycleBins);