refactoring: reducing outputChannels copy

This commit is contained in:
Andrey 2022-09-04 22:38:05 -04:00
parent 2be643a89b
commit 8fd5e46472
4 changed files with 8 additions and 11 deletions

View File

@ -92,11 +92,7 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 0
! Corrections
! todo: inline this further to injectorModel deadTime
uint16_t autoscale injectorLagMs;@@GAUGE_NAME_INJECTOR_LAG@@;"ms",{1/@@PACK_MULT_MS@@}, 0, 0, 0, 0
! Values used for load axes for fuel/ign tables
! These may or may not be the same value, depending on mode
uint16_t autoscale fuelingLoad;@@GAUGE_NAME_FUEL_LOAD@@;"%",{1/100}, 0, 0, 0, 0
uint16_t autoscale ignitionLoad;@@GAUGE_NAME_IGNITION_LOAD@@;"%",{1/100}, 0, 0, 0, 0
! we want a hash of engineMake+engineCode+vehicleName in the log file in order to match TS logs to rusEFI Online tune
uint16_t autoscale engineMakeCodeNameCrc16;@@GAUGE_NAME_ENGINE_CRC16@@;"crc16",1, 0, 0, 0, 0
! Wall model AE

View File

@ -626,8 +626,6 @@ static void updateFuelCorrections() {
}
static void updateFuelLoads() {
engine->outputChannels.fuelingLoad = getFuelingLoad();
engine->outputChannels.ignitionLoad = getIgnitionLoad();
engine->outputChannels.veTableYAxis = engine->engineState.currentVeLoad;
engine->outputChannels.afrTableYAxis = engine->fuelComputer->currentAfrLoad;
}

View File

@ -51,10 +51,6 @@ public:
float currentVe = 0;
float currentVeLoad = 0;
float fuelingLoad = 0;
float ignitionLoad = 0;
/**
* Raw fuel injection duration produced by current fuel algorithm, without any correction
*/

View File

@ -97,5 +97,12 @@ running_fuel_s running
int fuelInjectionCounter
int sparkCounter
! engine_state2_s
! Values used for load axes for fuel/ign tables
! These may or may not be the same value, depending on mode
float fuelingLoad;@@GAUGE_NAME_FUEL_LOAD@@
float ignitionLoad;@@GAUGE_NAME_IGNITION_LOAD@@
! engine_state_s
end_struct