only:minor encapsulation

This commit is contained in:
Matthew Kennedy 2023-10-12 03:19:18 -04:00 committed by rusefi
parent 701c54713e
commit 086fa81a3f
2 changed files with 11 additions and 1 deletions

View File

@ -21,10 +21,14 @@ void turnInjectionPinHigh(InjectionEvent *event) {
FuelSchedule::FuelSchedule() {
for (int cylinderIndex = 0; cylinderIndex < MAX_CYLINDER_COUNT; cylinderIndex++) {
elements[cylinderIndex].ownIndex = cylinderIndex;
elements[cylinderIndex].setIndex(cylinderIndex);
}
}
const WallFuel& InjectionEvent::getWallFuel() const {
return wallFuel;
}
void FuelSchedule::invalidate() {
isReady = false;
}

View File

@ -27,6 +27,12 @@ public:
// Call this every decoded trigger tooth. It will schedule any relevant events for this injector.
void onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase, float nextPhase);
const WallFuel& getWallFuel() const;
void setIndex(uint8_t index) {
ownIndex = index;
}
/**
* This is a performance optimization for IM_SIMULTANEOUS fuel strategy.
* It's more efficient to handle all injectors together if that's the case