From 373fd46a0f1c9f131f3b33e4e9f6ab7f1a55f949 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 22 Jun 2017 09:23:42 +0300 Subject: [PATCH] docs --- firmware/controllers/map_averaging.cpp | 8 +++++++- firmware/controllers/sensors/map.cpp | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/map_averaging.cpp b/firmware/controllers/map_averaging.cpp index 75915b55d3..ae9126dbee 100644 --- a/firmware/controllers/map_averaging.cpp +++ b/firmware/controllers/map_averaging.cpp @@ -1,6 +1,9 @@ /** * @file map_averaging.cpp * + * In order to have best MAP estimate possible, we real MAP value at a relatively high frequency + * and average the value within a specified angle position window for each cylinder + * * @date Dec 11, 2013 * @author Andrey Belomutskiy, (c) 2012-2017 * @@ -64,7 +67,7 @@ static float accumulators[2]; static int counters[2]; /** - * Running MAP accumulator + * Running MAP accumulator - sum of all measurements within averaging window */ static volatile float mapAccumulator = 0; /** @@ -80,6 +83,9 @@ static float v_averagedMapValue; EXTERN_ENGINE ; +/** + * here we have averaging start and averaging end points for each cylinder + */ static scheduling_s startTimer[INJECTION_PIN_COUNT][2]; static scheduling_s endTimer[INJECTION_PIN_COUNT][2]; diff --git a/firmware/controllers/sensors/map.cpp b/firmware/controllers/sensors/map.cpp index 443a2129dd..8cbaa13d1c 100644 --- a/firmware/controllers/sensors/map.cpp +++ b/firmware/controllers/sensors/map.cpp @@ -1,4 +1,7 @@ /** + * + * See also map_averaging.cpp + * * @author Andrey Belomutskiy, (c) 2012-2017 */ #include "main.h"