diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index 0531c1c12a..d4e8878080 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -102,7 +102,8 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 2 int16_t autoscale tpsAccelFuel;@@GAUGE_NAME_FUEL_TPS_EXTRA@@;"ms",{1/@@PACK_MULT_MS@@}, 0, 0, 0, 3 ! Ignition int16_t autoscale ignitionAdvance;@@GAUGE_NAME_TIMING_ADVANCE@@;"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 1 - uint16_t unusedDwellWasHere + uint8_t currentIgnitionMode; + uint8_t currentInjectionMode; uint16_t autoscale coilDutyCycle;@@GAUGE_NAME_DWELL_DUTY@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 ! Idle & ETB diff --git a/firmware/controllers/engine_cycle/fuel_schedule.cpp b/firmware/controllers/engine_cycle/fuel_schedule.cpp index d284a8450c..8c89abc0a6 100644 --- a/firmware/controllers/engine_cycle/fuel_schedule.cpp +++ b/firmware/controllers/engine_cycle/fuel_schedule.cpp @@ -4,19 +4,7 @@ * Handles injection scheduling */ -#include "global.h" -#include -#include -#include "fuel_schedule.h" -#include "event_registry.h" -#include "fuel_schedule.h" -#include "trigger_decoder.h" -#include "engine_math.h" - -// dependency injection -#include "engine_state.h" -#include "rpm_calculator_api.h" -// end of injection +#include "pch.h" #if EFI_ENGINE_CONTROL @@ -137,6 +125,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i) { } injection_mode_e mode = getCurrentInjectionMode(); + engine->outputChannels.currentInjectionMode = static_cast(mode); // We need two outputs if: // - we are running batch fuel, and have "use two wire batch" enabled diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index 276d4806d4..7168ad799c 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -92,6 +92,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_ efiAssertVoid(ObdCode::CUSTOM_SPARK_ANGLE_1, !cisnan(sparkAngle), "sparkAngle#1"); auto ignitionMode = getCurrentIgnitionMode(); + engine->outputChannels.currentIgnitionMode = static_cast(ignitionMode); const int index = getIgnitionPinForIndex(event->cylinderIndex, ignitionMode); const int coilIndex = ID2INDEX(getCylinderId(index));