don't warn if we intentionally skipped this spark

This commit is contained in:
Matthew Kennedy 2023-01-10 10:57:22 -08:00
parent 7cbb1d4f2a
commit d89b7eb619
2 changed files with 7 additions and 1 deletions

View File

@ -53,7 +53,7 @@ static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *ou
output->signalFallSparkId = event->sparkId;
if (!output->currentLogicValue) {
if (!output->currentLogicValue && !event->wasSparkLimited) {
warning(CUSTOM_OUT_OF_ORDER_COIL, "out-of-order coil off %s", output->getName());
output->outOfOrder = true;
}
@ -340,6 +340,7 @@ static void scheduleSparkEvent(bool limitedSpark, IgnitionEvent *event,
* By the way 32-bit value should hold at least 400 hours of events at 6K RPM x 12 events per revolution
*/
event->sparkId = engine->engineState.sparkCounter++;
event->wasSparkLimited = limitedSpark;
efitick_t chargeTime = 0;

View File

@ -106,6 +106,11 @@ void initNewSensors() {
Sensor::setMockValue(SensorType::BatteryVoltage, 10);
}
#endif
#if EFI_SIMULATOR
// Simulator gets battery voltage so it detects ignition-on
Sensor::setMockValue(SensorType::BatteryVoltage, 14);
#endif // EFI_SIMULATOR
}
void stopSensors() {