less code is better
This commit is contained in:
parent
039f70b18e
commit
4cbaddcc60
|
@ -642,7 +642,6 @@ static void updateFuelResults() {
|
|||
|
||||
engine->outputChannels.baseFuel = engine->engineState.baseFuel * 1000; // Convert grams to mg
|
||||
engine->outputChannels.fuelRunning = engine->engineState.running.fuel;
|
||||
engine->outputChannels.actualLastInjection = engine->actualLastInjection[0];
|
||||
|
||||
engine->outputChannels.fuelFlowRate = engine->engineState.fuelConsumption.getConsumptionGramPerSecond();
|
||||
engine->outputChannels.totalFuelConsumption = engine->engineState.fuelConsumption.getConsumedGrams();
|
||||
|
|
|
@ -344,9 +344,6 @@ public:
|
|||
|
||||
float stftCorrection[STFT_BANK_COUNT] = {0};
|
||||
|
||||
// Stores the actual pulse duration of the last injection for every cylinder
|
||||
floatms_t actualLastInjection[MAX_CYLINDER_COUNT] = {0};
|
||||
|
||||
// Standard cylinder air charge - 100% VE at standard temperature, grams per cylinder
|
||||
float standardAirCharge = 0;
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ struct Fueling {
|
|||
static void populateFrame(Fueling& msg) {
|
||||
msg.cylAirmass = engine->engineState.sd.airMassInOneCylinder;
|
||||
msg.estAirflow = engine->engineState.airflowEstimate;
|
||||
msg.fuel_pulse = engine->actualLastInjection[0];
|
||||
msg.fuel_pulse = (float)engine->outputChannels.actualLastInjection;
|
||||
msg.knockCount = engine->module<KnockController>()->getKnockCount();
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,9 @@ void InjectionEvent::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase
|
|||
|
||||
engine->engineState.fuelConsumption.consumeFuel(injectionMassGrams * numberOfInjections, nowNt);
|
||||
|
||||
engine->actualLastInjection[this->cylinderNumber] = injectionDuration;
|
||||
if (this->cylinderNumber == 0) {
|
||||
engine->outputChannels.actualLastInjection = injectionDuration;
|
||||
}
|
||||
|
||||
if (cisnan(injectionDuration)) {
|
||||
warning(CUSTOM_OBD_NAN_INJECTION, "NaN injection pulse");
|
||||
|
|
Loading…
Reference in New Issue