english do you speak it
This commit is contained in:
parent
c8e821ce16
commit
fef406a5a6
|
@ -30,7 +30,7 @@ public:
|
|||
* This is a performance optimization for IM_SIMULTANEOUS fuel strategy.
|
||||
* It's more efficient to handle all injectors together if that's the case
|
||||
*/
|
||||
bool isSimultanious = false;
|
||||
bool isSimultaneous = false;
|
||||
InjectorOutputPin *outputs[MAX_WIRES_COUNT];
|
||||
uint8_t ownIndex = 0;
|
||||
uint8_t cylinderNumber = 0;
|
||||
|
|
|
@ -113,17 +113,17 @@ bool FuelSchedule::addFuelEventsForCylinder(int i ) {
|
|||
}
|
||||
|
||||
InjectorOutputPin *output = &enginePins.injectors[injectorIndex];
|
||||
bool isSimultanious = mode == IM_SIMULTANEOUS;
|
||||
bool isSimultaneous = mode == IM_SIMULTANEOUS;
|
||||
|
||||
InjectionEvent *ev = &elements[i];
|
||||
|
||||
ev->outputs[0] = output;
|
||||
ev->outputs[1] = secondOutput;
|
||||
ev->isSimultanious = isSimultanious;
|
||||
ev->isSimultaneous = isSimultaneous;
|
||||
// Stash the cylinder number so we can select the correct fueling bank later
|
||||
ev->cylinderNumber = injectorIndex;
|
||||
|
||||
if (!isSimultanious && !output->isInitialized()) {
|
||||
if (!isSimultaneous && !output->isInitialized()) {
|
||||
// todo: extract method for this index math
|
||||
warning(CUSTOM_OBD_INJECTION_NO_PIN_ASSIGNED, "no_pin_inj #%s", output->name);
|
||||
}
|
||||
|
|
|
@ -48,23 +48,23 @@
|
|||
|
||||
#include "backup_ram.h"
|
||||
|
||||
void startSimultaniousInjection(void*) {
|
||||
void startSimultaneousInjection(void*) {
|
||||
efitick_t nowNt = getTimeNowNt();
|
||||
for (size_t i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
||||
enginePins.injectors[i].open(nowNt);
|
||||
}
|
||||
}
|
||||
|
||||
static void endSimultaniousInjectionOnlyTogglePins(void* = nullptr) {
|
||||
static void endSimultaneousInjectionOnlyTogglePins(void* = nullptr) {
|
||||
efitick_t nowNt = getTimeNowNt();
|
||||
for (size_t i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
||||
enginePins.injectors[i].close(nowNt);
|
||||
}
|
||||
}
|
||||
|
||||
void endSimultaniousInjection(InjectionEvent *event) {
|
||||
void endSimultaneousInjection(InjectionEvent *event) {
|
||||
event->isScheduled = false;
|
||||
endSimultaniousInjectionOnlyTogglePins(engine);
|
||||
endSimultaneousInjectionOnlyTogglePins(engine);
|
||||
engine->injectionEvents.addFuelEventsForCylinder(event->ownIndex);
|
||||
}
|
||||
|
||||
|
@ -266,9 +266,9 @@ void InjectionEvent::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase
|
|||
|
||||
action_s startAction, endAction;
|
||||
// We use different callbacks based on whether we're running sequential mode or not - everything else is the same
|
||||
if (isSimultanious) {
|
||||
startAction = startSimultaniousInjection;
|
||||
endAction = { &endSimultaniousInjection, this };
|
||||
if (isSimultaneous) {
|
||||
startAction = startSimultaneousInjection;
|
||||
endAction = { &endSimultaneousInjection, this };
|
||||
} else {
|
||||
// sequential or batch
|
||||
startAction = { &turnInjectionPinHigh, this };
|
||||
|
@ -502,12 +502,12 @@ void PrimeController::onPrimeStart() {
|
|||
|
||||
// Open all injectors, schedule closing later
|
||||
m_isPriming = true;
|
||||
startSimultaniousInjection();
|
||||
startSimultaneousInjection();
|
||||
engine->executor.scheduleByTimestampNt("prime", &m_end, endTime, { onPrimeEndAdapter, this });
|
||||
}
|
||||
|
||||
void PrimeController::onPrimeEnd() {
|
||||
endSimultaniousInjectionOnlyTogglePins();
|
||||
endSimultaneousInjectionOnlyTogglePins();
|
||||
|
||||
m_isPriming = false;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp, float currentPhase, float nextPhase);
|
||||
bool noFiringUntilVvtSync(vvt_mode_e vvtMode);
|
||||
|
||||
void startSimultaniousInjection(void* = nullptr);
|
||||
void endSimultaniousInjection(InjectionEvent *event);
|
||||
void startSimultaneousInjection(void* = nullptr);
|
||||
void endSimultaneousInjection(InjectionEvent *event);
|
||||
void turnInjectionPinHigh(InjectionEvent *event);
|
||||
void turnInjectionPinLow(InjectionEvent *event);
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ void RpmCalculator::setRpmValue(float value) {
|
|||
}
|
||||
#if EFI_ENGINE_CONTROL
|
||||
// This presumably fixes injection mode change for cranking-to-running transition.
|
||||
// 'isSimultanious' flag should be updated for events if injection modes differ for cranking and running.
|
||||
// 'isSimultaneous' flag should be updated for events if injection modes differ for cranking and running.
|
||||
if (state != oldState && engineConfiguration->crankingInjectionMode != engineConfiguration->injectionMode) {
|
||||
// Reset the state of all injectors: when we change fueling modes, we could
|
||||
// immediately reschedule an injection that's currently underway. That will cause
|
||||
|
|
|
@ -26,9 +26,9 @@ TEST(engine, testPlainCrankingWithoutAdvancedFeatures) {
|
|||
// two simultaneous injections
|
||||
ASSERT_EQ( 4, engine->executor.size()) << "plain#2";
|
||||
|
||||
eth.assertEvent5("sim start", 0, (void*)startSimultaniousInjection, 100000 - 1625);
|
||||
eth.assertEvent5("sim start", 0, (void*)startSimultaneousInjection, 100000 - 1625);
|
||||
// -1 because ugh floating point math
|
||||
eth.assertEvent5("sim end", 1, (void*)endSimultaniousInjection, 100000 - 1);
|
||||
eth.assertEvent5("sim end", 1, (void*)endSimultaneousInjection, 100000 - 1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
// test if ignition mode is temporary changed to wasted spark, if set to individual coils
|
||||
ASSERT_EQ(IM_WASTED_SPARK, getCurrentIgnitionMode());
|
||||
// check real events
|
||||
eth.assertEvent5("inj start#1", 0, (void*)startSimultaniousInjection, 97500);
|
||||
eth.assertEvent5("inj end#1", 1, (void*)endSimultaniousInjection, 100000);
|
||||
eth.assertEvent5("inj start#1", 0, (void*)startSimultaneousInjection, 97500);
|
||||
eth.assertEvent5("inj end#1", 1, (void*)endSimultaneousInjection, 100000);
|
||||
|
||||
// skip the rest of the cycle
|
||||
eth.fireFall(200);
|
||||
|
@ -74,8 +74,8 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
// two simultaneous injections
|
||||
ASSERT_EQ( 4, engine->executor.size()) << "plain#2";
|
||||
// check real events
|
||||
eth.assertEvent5("inj start#2", 0, (void*)startSimultaniousInjection, 148375);
|
||||
eth.assertEvent5("inj end#2", 1, (void*)endSimultaniousInjection, 149999);
|
||||
eth.assertEvent5("inj start#2", 0, (void*)startSimultaneousInjection, 148375);
|
||||
eth.assertEvent5("inj end#2", 1, (void*)endSimultaneousInjection, 149999);
|
||||
|
||||
// Now perform a fake VVT sync and check that ignition mode changes to sequential
|
||||
engine->triggerCentral.triggerState.syncEnginePhase(1, 0, 720);
|
||||
|
|
Loading…
Reference in New Issue