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) |
void | startAveraging (mapSampler *s) |
float | filterMapValue (float value) |
void | mapAveragingAdcCallback (float instantVoltage) |
static void | applyMapMinBufferLength () |
Variables | |
static float | averagedMapRunningBuffer [MAX_MAP_BUFFER_LENGTH] |
static int | mapMinBufferLength = 0 |
static int | averagedMapBufIdx = 0 |
static size_t | currentMapAverager = 0 |
static ExpAverage | expAverage |
|
static |
Definition at line 167 of file map_averaging.cpp.
Referenced by MapAveragingModule::init(), and MapAveragingModule::onConfigurationChange().
|
static |
Definition at line 160 of file map_averaging.cpp.
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.
Definition at line 99 of file map_averaging.cpp.
Referenced by MapAverager::stop().
void mapAveragingAdcCallback | ( | float | instantVoltage | ) |
This method is invoked from ADC callback.
Definition at line 140 of file map_averaging.cpp.
Referenced by onFastAdcComplete().
void startAveraging | ( | mapSampler * | s | ) |
Definition at line 56 of file map_averaging.cpp.
|
static |
Definition at line 49 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), and MapAverager::stop().
|
static |
Definition at line 47 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), and MapAverager::stop().
|
static |
Definition at line 54 of file map_averaging.cpp.
Referenced by mapAveragingAdcCallback(), and startAveraging().
|
static |
Definition at line 96 of file map_averaging.cpp.
Referenced by filterMapValue().
|
static |
Definition at line 48 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), and MapAverager::stop().