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 (scheduling_s *endAveragingScheduling) |
void | mapAveragingAdcCallback (float instantVoltage) |
static void | applyMapMinBufferLength () |
void | postMapState (TunerStudioOutputChannels *tsOutputChannels) |
void | refreshMapAveragingPreCalc () |
void | mapAveragingTriggerCallback (uint32_t index, efitick_t edgeTimestamp) |
void | initMapAveraging () |
Variables | |
static float | averagedMapRunningBuffer [MAX_MAP_BUFFER_LENGTH] |
int | mapMinBufferLength = 0 |
static int | averagedMapBufIdx = 0 |
static scheduling_s | startTimers [MAX_CYLINDER_COUNT][2] |
static scheduling_s | endTimers [MAX_CYLINDER_COUNT][2] |
static size_t | currentMapAverager = 0 |
|
static |
Definition at line 160 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().
void initMapAveraging | ( | ) |
Definition at line 268 of file map_averaging.cpp.
Referenced by commonInitEngineController().
void mapAveragingAdcCallback | ( | float | instantVoltage | ) |
This method is invoked from ADC callback.
Definition at line 135 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 211 of file map_averaging.cpp.
Referenced by TriggerCentral::handleShaftSignal().
void postMapState | ( | TunerStudioOutputChannels * | tsOutputChannels | ) |
Definition at line 172 of file map_averaging.cpp.
Referenced by updateTunerStudioState().
void refreshMapAveragingPreCalc | ( | ) |
Definition at line 177 of file map_averaging.cpp.
Referenced by Engine::periodicFastCallback().
|
static |
Definition at line 65 of file map_averaging.cpp.
Referenced by mapAveragingTriggerCallback().
|
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 63 of file map_averaging.cpp.
Referenced by mapAveragingAdcCallback(), and startAveraging().
|
static |
Definition at line 58 of file map_averaging.cpp.
Referenced by mapAveragingTriggerCallback().
int mapMinBufferLength = 0 |
Definition at line 51 of file map_averaging.cpp.
Referenced by applyMapMinBufferLength(), mapAveragingTriggerCallback(), printMAPInfo(), and MapAverager::stop().
|
static |
here we have averaging start and averaging end points for each cylinder
Definition at line 57 of file map_averaging.cpp.
Referenced by mapAveragingTriggerCallback().