rusEFI
The most advanced open source ECU
|
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
This file is part of rusEfi - see http://rusefi.com
rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file map_averaging.cpp.
Functions | |
fail ("EFI_SHAFT_POSITION_INPUT required to have EFI_EMULATE_POSITION_SENSORS") static NamedOutputPin mapAveragingPin("map") | |
static void | endAveraging (MapAverager *arg) |
static void | startAveraging (sampler *s) |
float | filterMapValue (float value) |
void | mapAveragingAdcCallback (float instantVoltage) |
static void | applyMapMinBufferLength () |
void | refreshMapAveragingPreCalc () |
void | mapAveragingTriggerCallback (uint32_t index, efitick_t edgeTimestamp) |
void | initMapAveraging () |
Variables | |
static float | averagedMapRunningBuffer [MAX_MAP_BUFFER_LENGTH] |
static int | mapMinBufferLength = 0 |
static int | averagedMapBufIdx = 0 |
static sampler | samplers [MAX_CYLINDER_COUNT][2] |
static size_t | currentMapAverager = 0 |
|
static |
Definition at line 176 of file map_averaging.cpp.
Referenced by initMapAveraging(), and mapAveragingTriggerCallback().
|
static |
fail | ( | "EFI_SHAFT_POSITION_INPUT required to have EFI_EMULATE_POSITION_SENSORS" | ) |
this instance does not have a real physical pin - it's only used for engine sniffer
todo: we can kind of add real physical pin just for a very narrow case of troubleshooting but only if we ever need it :)
Engine idles around 20Hz and revs up to 140Hz, at 60/2 and 8 cylinders we have about 20Khz events If we can read buffer at 50Hz we want buffer to be about 400 elements.
Definition at line 34 of file trigger_emulator_algo.cpp.
Referenced by Engine::periodicSlowCallback().
float filterMapValue | ( | float | value | ) |
Definition at line 105 of file map_averaging.cpp.
Referenced by MapAverager::stop().
void initMapAveraging | ( | ) |
Definition at line 277 of file map_averaging.cpp.
Referenced by commonInitEngineController().
void mapAveragingAdcCallback | ( | float | instantVoltage | ) |
This method is invoked from ADC callback.
Definition at line 151 of file map_averaging.cpp.
Referenced by onFastAdcComplete().
void mapAveragingTriggerCallback | ( | uint32_t | index, |
efitick_t | edgeTimestamp | ||
) |
Shaft Position callback used to schedule start and end of MAP averaging
Definition at line 221 of file map_averaging.cpp.
Referenced by TriggerCentral::handleShaftSignal().
void refreshMapAveragingPreCalc | ( | ) |
Definition at line 187 of file map_averaging.cpp.
Referenced by Engine::periodicFastCallback().
|
static |
Definition at line 69 of file map_averaging.cpp.
|
static |
Definition at line 52 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), and MapAverager::stop().
|
static |
Definition at line 50 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), and MapAverager::stop().
|
static |
Definition at line 67 of file map_averaging.cpp.
Referenced by mapAveragingAdcCallback(), and startAveraging().
|
static |
Definition at line 51 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), mapAveragingTriggerCallback(), and MapAverager::stop().
|
static |
Definition at line 62 of file map_averaging.cpp.
Referenced by mapAveragingTriggerCallback().