unit_tests "logic analyzer" style output #6403

only:uaefi
This commit is contained in:
rusefillc 2024-12-27 13:16:26 -05:00
parent 05b1656071
commit f073247010
3 changed files with 9 additions and 4 deletions

View File

@ -335,12 +335,17 @@ void LogTriggerCoilState(efitick_t timestamp, bool state) {
//SetNextCompositeEntry(timestamp, trigger1, trigger2, trigger);
}
void LogTriggerInjectorState(efitick_t timestamp, bool state) {
void LogTriggerInjectorState(efitick_t timestamp, size_t index, bool state) {
if (!ToothLoggerEnabled) {
return;
}
currentInjectorState = state;
UNUSED(timestamp);
#if EFI_UNIT_TEST
jsonTraceEntry("inj", 10 + index, state, timestamp);
#endif // EFI_UNIT_TEST
//SetNextCompositeEntry(timestamp, trigger1, trigger2, trigger);
}

View File

@ -34,7 +34,7 @@ void LogTriggerTopDeadCenter(efitick_t timestamp);
void LogTriggerCoilState(efitick_t timestamp, bool state);
void LogTriggerInjectorState(efitick_t timestamp, bool state);
void LogTriggerInjectorState(efitick_t timestamp, size_t index, bool state);
typedef struct __attribute__ ((packed)) {
// the whole order of all packet bytes is reversed, not just the 'endian-swap' integers

View File

@ -50,7 +50,7 @@ void InjectorOutputPin::open(efitick_t nowNt) {
#endif /* FUEL_MATH_EXTREME_LOGGING */
} else {
#if EFI_TOOTH_LOGGER
LogTriggerInjectorState(nowNt, true);
LogTriggerInjectorState(nowNt, injectorIndex, true);
#endif // EFI_TOOTH_LOGGER
setHigh();
}
@ -72,7 +72,7 @@ void InjectorOutputPin::close(efitick_t nowNt) {
#endif /* FUEL_MATH_EXTREME_LOGGING */
} else {
#if EFI_TOOTH_LOGGER
LogTriggerInjectorState(nowNt, false);
LogTriggerInjectorState(nowNt, injectorIndex, false);
#endif // EFI_TOOTH_LOGGER
setLow();
}