SPARK_EXTREME_LOGGING
This commit is contained in:
parent
7398ba5059
commit
2a2722c3cc
|
@ -126,10 +126,16 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
|
||||||
}
|
}
|
||||||
|
|
||||||
static void chargeTrailingSpark(IgnitionOutputPin* pin) {
|
static void chargeTrailingSpark(IgnitionOutputPin* pin) {
|
||||||
|
#if SPARK_EXTREME_LOGGING
|
||||||
|
efiPrintf("chargeTrailingSpark %s", pin->name);
|
||||||
|
#endif /* SPARK_EXTREME_LOGGING */
|
||||||
pin->setHigh();
|
pin->setHigh();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fireTrailingSpark(IgnitionOutputPin* pin) {
|
static void fireTrailingSpark(IgnitionOutputPin* pin) {
|
||||||
|
#if SPARK_EXTREME_LOGGING
|
||||||
|
efiPrintf("fireTrailingSpark %s", pin->name);
|
||||||
|
#endif /* SPARK_EXTREME_LOGGING */
|
||||||
pin->setLow();
|
pin->setLow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,6 +208,10 @@ if (engineConfiguration->debugMode == DBG_DWELL_METRIC) {
|
||||||
engine->executor.scheduleByTimestampNt("firing", &event->sparkEvent.scheduling, nextFiring, { fireSparkAndPrepareNextSchedule, event });
|
engine->executor.scheduleByTimestampNt("firing", &event->sparkEvent.scheduling, nextFiring, { fireSparkAndPrepareNextSchedule, event });
|
||||||
} else {
|
} else {
|
||||||
if (CONFIG(enableTrailingSparks)) {
|
if (CONFIG(enableTrailingSparks)) {
|
||||||
|
#if SPARK_EXTREME_LOGGING
|
||||||
|
efiPrintf("scheduleByAngle TrailingSparks");
|
||||||
|
#endif /* SPARK_EXTREME_LOGGING */
|
||||||
|
|
||||||
// Trailing sparks are enabled - schedule an event for the corresponding trailing coil
|
// Trailing sparks are enabled - schedule an event for the corresponding trailing coil
|
||||||
scheduleByAngle(
|
scheduleByAngle(
|
||||||
&event->trailingSparkFire, nowNt, ENGINE(engineState.trailingSparkAngle),
|
&event->trailingSparkFire, nowNt, ENGINE(engineState.trailingSparkAngle),
|
||||||
|
|
|
@ -305,7 +305,16 @@ const char *NamedOutputPin::getShortName() const {
|
||||||
return shortName == nullptr ? name : shortName;
|
return shortName == nullptr ? name : shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if EFI_UNIT_TEST
|
||||||
|
extern bool verboseMode;
|
||||||
|
#endif // EFI_UNIT_TEST
|
||||||
|
|
||||||
void NamedOutputPin::setHigh() {
|
void NamedOutputPin::setHigh() {
|
||||||
|
#if EFI_UNIT_TEST
|
||||||
|
if (verboseMode) {
|
||||||
|
efiPrintf("pin %s goes high", name);
|
||||||
|
}
|
||||||
|
#endif // EFI_UNIT_TEST
|
||||||
#if EFI_DEFAILED_LOGGING
|
#if EFI_DEFAILED_LOGGING
|
||||||
// signal->hi_time = hTimeNow();
|
// signal->hi_time = hTimeNow();
|
||||||
#endif /* EFI_DEFAILED_LOGGING */
|
#endif /* EFI_DEFAILED_LOGGING */
|
||||||
|
@ -319,6 +328,12 @@ void NamedOutputPin::setHigh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NamedOutputPin::setLow() {
|
void NamedOutputPin::setLow() {
|
||||||
|
#if EFI_UNIT_TEST
|
||||||
|
if (verboseMode) {
|
||||||
|
efiPrintf("pin %s goes low", name);
|
||||||
|
}
|
||||||
|
#endif // EFI_UNIT_TEST
|
||||||
|
|
||||||
// turn off the output
|
// turn off the output
|
||||||
setValue(false);
|
setValue(false);
|
||||||
|
|
||||||
|
@ -402,6 +417,12 @@ void OutputPin::setValue(int logicValue) {
|
||||||
// ScopePerf perf(PE::OutputPinSetValue);
|
// ScopePerf perf(PE::OutputPinSetValue);
|
||||||
#endif // ENABLE_PERF_TRACE
|
#endif // ENABLE_PERF_TRACE
|
||||||
|
|
||||||
|
#if EFI_UNIT_TEST
|
||||||
|
if (verboseMode) {
|
||||||
|
efiPrintf("pin goes %d", logicValue);
|
||||||
|
}
|
||||||
|
#endif // EFI_UNIT_TEST
|
||||||
|
|
||||||
// Always store the current logical value of the pin (so it can be
|
// Always store the current logical value of the pin (so it can be
|
||||||
// used internally even if not connected to a real hardware pin)
|
// used internally even if not connected to a real hardware pin)
|
||||||
currentLogicValue = logicValue;
|
currentLogicValue = logicValue;
|
||||||
|
|
Loading…
Reference in New Issue