add ignition/injection mode output channel #85
(cherry picked from commit 9621ff844eea704421dc6172d66a2f4053467277)
This commit is contained in:
parent
a9142efa85
commit
40673ffda2
|
@ -101,8 +101,9 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 2
|
||||||
uint16_t canReadCounter;;"",1, 0, 0, 0, 0
|
uint16_t canReadCounter;;"",1, 0, 0, 0, 0
|
||||||
int16_t autoscale tpsAccelFuel;@@GAUGE_NAME_FUEL_TPS_EXTRA@@;"ms",{1/@@PACK_MULT_MS@@}, 0, 0, 0, 3
|
int16_t autoscale tpsAccelFuel;@@GAUGE_NAME_FUEL_TPS_EXTRA@@;"ms",{1/@@PACK_MULT_MS@@}, 0, 0, 0, 3
|
||||||
! Ignition
|
! Ignition
|
||||||
uint16_t warningCounter;@@GAUGE_NAME_WARNING_COUNTER@@;"count",1, 0, 0, 0, 0
|
int16_t autoscale ignitionAdvance;@@GAUGE_NAME_TIMING_ADVANCE@@;"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 1
|
||||||
uint16_t lastErrorCode;@@GAUGE_NAME_WARNING_LAST@@;"error",1, 0, 0, 0, 0
|
uint8_t currentIgnitionMode;
|
||||||
|
uint8_t currentInjectionMode;
|
||||||
|
|
||||||
uint16_t autoscale coilDutyCycle;@@GAUGE_NAME_DWELL_DUTY@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
|
uint16_t autoscale coilDutyCycle;@@GAUGE_NAME_DWELL_DUTY@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
|
||||||
! Idle & ETB
|
! Idle & ETB
|
||||||
|
|
|
@ -4,19 +4,7 @@
|
||||||
* Handles injection scheduling
|
* Handles injection scheduling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "global.h"
|
#include "pch.h"
|
||||||
#include <rusefi/arrays.h>
|
|
||||||
#include <rusefi/isnan.h>
|
|
||||||
#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
|
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
|
|
||||||
|
@ -137,6 +125,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
injection_mode_e mode = getCurrentInjectionMode();
|
injection_mode_e mode = getCurrentInjectionMode();
|
||||||
|
engine->outputChannels.currentInjectionMode = static_cast<uint8_t>(mode);
|
||||||
|
|
||||||
// We need two outputs if:
|
// We need two outputs if:
|
||||||
// - we are running batch fuel, and have "use two wire batch" enabled
|
// - we are running batch fuel, and have "use two wire batch" enabled
|
||||||
|
|
|
@ -104,6 +104,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
|
||||||
efiAssertVoid(ObdCode::CUSTOM_SPARK_ANGLE_1, !cisnan(sparkAngle), "sparkAngle#1");
|
efiAssertVoid(ObdCode::CUSTOM_SPARK_ANGLE_1, !cisnan(sparkAngle), "sparkAngle#1");
|
||||||
|
|
||||||
auto ignitionMode = getCurrentIgnitionMode();
|
auto ignitionMode = getCurrentIgnitionMode();
|
||||||
|
engine->outputChannels.currentIgnitionMode = static_cast<uint8_t>(ignitionMode);
|
||||||
|
|
||||||
const int index = getIgnitionPinForIndex(event->cylinderIndex, ignitionMode);
|
const int index = getIgnitionPinForIndex(event->cylinderIndex, ignitionMode);
|
||||||
const int coilIndex = ID2INDEX(getCylinderId(index));
|
const int coilIndex = ID2INDEX(getCylinderId(index));
|
||||||
|
|
Loading…
Reference in New Issue