maybe micro-optimization

This commit is contained in:
rusefi 2017-05-25 23:23:22 -04:00
parent ef066786c1
commit 6c0fae23fa
1 changed files with 5 additions and 0 deletions

View File

@ -207,6 +207,11 @@ static bool isUpEvent[6] = { false, true, false, true, false, true };
static const char *eventId[6] = { CRANK1, CRANK1, CRANK2, CRANK2, CRANK3, CRANK3 };
static ALWAYS_INLINE void reportEventToWaveChart(trigger_event_e ckpSignalType, int index DECLARE_ENGINE_PARAMETER_SUFFIX) {
if (!ENGINE(isEngineChartEnabled)) { // this is here just as a shortcut so that we avoid engine sniffer as soon as possible
return; // engineSnifferRpmThreshold is accounted for inside ENGINE(isEngineChartEnabled)
}
itoa10(&shaft_signal_msg_index[2], index);
bool isUp = isUpEvent[(int) ckpSignalType];
shaft_signal_msg_index[0] = isUp ? 'u' : 'd';