Fix multi bank fueling (#2661)
* add cylinder number * changelog * wording
This commit is contained in:
parent
155bfd9aeb
commit
13f3d1e291
|
@ -28,6 +28,8 @@ All notable user-facing or behavior-altering changes will be documented in this
|
|||
## Month 202x Release - "Release Name"
|
||||
### Fixed
|
||||
- LCD screen works again #2576
|
||||
### Added
|
||||
- Per-bank closed loop fuel correction (each cylinder corrected by the sensor that sees its exhaust)
|
||||
|
||||
## April 2021 Release - "Malbec"
|
||||
### Added
|
||||
|
|
|
@ -32,7 +32,8 @@ public:
|
|||
*/
|
||||
bool isSimultanious = false;
|
||||
InjectorOutputPin *outputs[MAX_WIRES_COUNT];
|
||||
int ownIndex = 0;
|
||||
uint8_t ownIndex = 0;
|
||||
uint8_t cylinderNumber = 0;
|
||||
DECLARE_ENGINE_PTR;
|
||||
event_trigger_position_s injectionStart;
|
||||
|
||||
|
|
|
@ -106,6 +106,8 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF
|
|||
ev->outputs[0] = output;
|
||||
ev->outputs[1] = secondOutput;
|
||||
ev->isSimultanious = isSimultanious;
|
||||
// Stash the cylinder number so we can select the correct fueling bank later
|
||||
ev->cylinderNumber = injectorIndex;
|
||||
|
||||
if (!isSimultanious && !output->isInitialized()) {
|
||||
// todo: extract method for this index math
|
||||
|
|
|
@ -204,7 +204,7 @@ void InjectionEvent::onTriggerTooth(size_t trgEventIndex, int rpm, efitick_t now
|
|||
}
|
||||
|
||||
// Select fuel mass from the correct bank
|
||||
uint8_t bankIndex = CONFIG(cylinderBankSelect[this->ownIndex]);
|
||||
uint8_t bankIndex = CONFIG(cylinderBankSelect[this->cylinderNumber]);
|
||||
float injectionMassGrams = ENGINE(injectionMass)[bankIndex];
|
||||
|
||||
// Perform wall wetting adjustment on fuel mass, not duration, so that
|
||||
|
|
Loading…
Reference in New Issue