refactoring: reducing outputChannels copy
This commit is contained in:
parent
5237235e48
commit
e240ac84d3
|
@ -902,8 +902,6 @@ void updateTunerStudioState() {
|
||||||
tsOutputChannels->debugFloatField2 = instantRpm / Sensor::getOrZero(SensorType::Rpm);
|
tsOutputChannels->debugFloatField2 = instantRpm / Sensor::getOrZero(SensorType::Rpm);
|
||||||
#endif // EFI_SHAFT_POSITION_INPUT
|
#endif // EFI_SHAFT_POSITION_INPUT
|
||||||
|
|
||||||
tsOutputChannels->mostRecentTimeBetweenSparkEvents = engine->mostRecentTimeBetweenSparkEvents;
|
|
||||||
tsOutputChannels->mostRecentTimeBetweenIgnitionEvents = engine->mostRecentTimeBetweenIgnitionEvents;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DBG_ION:
|
case DBG_ION:
|
||||||
|
|
|
@ -227,9 +227,7 @@ public:
|
||||||
FanControl2 fan2;
|
FanControl2 fan2;
|
||||||
|
|
||||||
efitick_t mostRecentSparkEvent;
|
efitick_t mostRecentSparkEvent;
|
||||||
efitick_t mostRecentTimeBetweenSparkEvents;
|
|
||||||
efitick_t mostRecentIgnitionEvent;
|
efitick_t mostRecentIgnitionEvent;
|
||||||
efitick_t mostRecentTimeBetweenIgnitionEvents;
|
|
||||||
|
|
||||||
PrimaryTriggerConfiguration primaryTriggerConfiguration;
|
PrimaryTriggerConfiguration primaryTriggerConfiguration;
|
||||||
#if CAMS_PER_BANK == 1
|
#if CAMS_PER_BANK == 1
|
||||||
|
|
|
@ -139,7 +139,7 @@ void InjectorOutputPin::close(efitick_t nowNt) {
|
||||||
void turnInjectionPinLow(InjectionEvent *event) {
|
void turnInjectionPinLow(InjectionEvent *event) {
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
|
|
||||||
engine->mostRecentTimeBetweenIgnitionEvents = nowNt - engine->mostRecentIgnitionEvent;
|
engine->outputChannels.mostRecentTimeBetweenIgnitionEvents = nowNt - engine->mostRecentIgnitionEvent;
|
||||||
engine->mostRecentIgnitionEvent = nowNt;
|
engine->mostRecentIgnitionEvent = nowNt;
|
||||||
|
|
||||||
event->isScheduled = false;
|
event->isScheduled = false;
|
||||||
|
|
|
@ -36,7 +36,7 @@ int isIgnitionTimingError(void) {
|
||||||
|
|
||||||
static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *output) {
|
static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *output) {
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
engine->mostRecentTimeBetweenSparkEvents = nowNt - engine->mostRecentSparkEvent;
|
engine->outputChannels.mostRecentTimeBetweenSparkEvents = nowNt - engine->mostRecentSparkEvent;
|
||||||
engine->mostRecentSparkEvent = nowNt;
|
engine->mostRecentSparkEvent = nowNt;
|
||||||
|
|
||||||
#if SPARK_EXTREME_LOGGING
|
#if SPARK_EXTREME_LOGGING
|
||||||
|
|
Loading…
Reference in New Issue