bugfix: pin names were not shown in engine sniffer

This commit is contained in:
rusEfi 2019-08-18 15:27:10 -04:00
parent 7a7dbb8c30
commit c29f038b83
3 changed files with 7 additions and 5 deletions

View File

@ -426,12 +426,12 @@ void printOverallStatus(systime_t nowSeconds) {
#endif /* EFI_WAVE_ANALYZER */
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
printOutPin(enginePins.coils[i].name, CONFIGB(ignitionPins)[i]);
printOutPin(enginePins.coils[i].getShortName(), CONFIGB(ignitionPins)[i]);
printOutPin(enginePins.injectors[i].name, CONFIGB(injectionPins)[i]);
printOutPin(enginePins.injectors[i].getShortName(), CONFIGB(injectionPins)[i]);
}
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT;i++) {
printOutPin(enginePins.auxValve[i].name, engineConfiguration->auxValves[i]);
printOutPin(enginePins.auxValve[i].getShortName(), engineConfiguration->auxValves[i]);
}
#endif /* EFI_PROD_CODE */

View File

@ -43,7 +43,7 @@ static const char *sparkShortNames[] = { PROTOCOL_COIL1_SHORT_NAME, "c2", "c3",
static const char *injectorNames[] = { "injector1", "injector2", "injector3", "injector4", "injector5", "injector6",
"injector7", "injector8", "injector9", "injector10", "injector11", "injector12"};
static const char *injectorShortNames[] = { "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8",
static const char *injectorShortNames[] = { PROTOCOL_INJ1_SHORT_NAME, "i2", "i3", "i4", "i5", "i6", "i7", "i8",
"j9", "iA", "iB", "iC"};
static const char *auxValveShortNames[] = { "a1", "a2"};
@ -242,7 +242,6 @@ void NamedOutputPin::setHigh() {
setValue(true);
#if EFI_ENGINE_SNIFFER
addEngineSnifferEvent(getShortName(), PROTOCOL_ES_UP);
#endif /* EFI_ENGINE_SNIFFER */
}

View File

@ -85,6 +85,9 @@ public:
bool stop();
// todo: char pointer is a bit of a memory waste here, we can reduce RAM usage by software-based getName() method
const char *name;
/**
* rusEfi Engine Sniffer protocol uses these short names to reduce bytes usage
*/
const char *shortName = NULL;
};