auto-sync
This commit is contained in:
parent
fc07a0366c
commit
558b03ea69
|
@ -41,6 +41,10 @@ public:
|
||||||
* TODO: better data structure? better algorithm?
|
* TODO: better data structure? better algorithm?
|
||||||
*/
|
*/
|
||||||
uint8_t hasEvents[PWM_PHASE_MAX_COUNT];
|
uint8_t hasEvents[PWM_PHASE_MAX_COUNT];
|
||||||
|
/**
|
||||||
|
* How many trigger events have injection? This depends on fuel strategy & trigger shape
|
||||||
|
*/
|
||||||
|
int eventsCount;
|
||||||
private:
|
private:
|
||||||
void clear();
|
void clear();
|
||||||
void registerInjectionEvent(OutputSignalList *sourceList, NamedOutputPin *output, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S);
|
void registerInjectionEvent(OutputSignalList *sourceList, NamedOutputPin *output, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S);
|
||||||
|
|
|
@ -133,7 +133,10 @@ void FuelSchedule::registerInjectionEvent(OutputSignalList *sourceList, NamedOut
|
||||||
ev->actuator = actuator;
|
ev->actuator = actuator;
|
||||||
|
|
||||||
findTriggerPosition(&ev->position, angle PASS_ENGINE_PARAMETER);
|
findTriggerPosition(&ev->position, angle PASS_ENGINE_PARAMETER);
|
||||||
|
if(!hasEvents[ev->position.eventIndex]) {
|
||||||
hasEvents[ev->position.eventIndex] = true;
|
hasEvents[ev->position.eventIndex] = true;
|
||||||
|
eventsCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FuelSchedule::FuelSchedule() {
|
FuelSchedule::FuelSchedule() {
|
||||||
|
@ -141,6 +144,7 @@ FuelSchedule::FuelSchedule() {
|
||||||
|
|
||||||
void FuelSchedule::clear() {
|
void FuelSchedule::clear() {
|
||||||
memset(hasEvents, 0, sizeof(hasEvents));
|
memset(hasEvents, 0, sizeof(hasEvents));
|
||||||
|
eventsCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FuelSchedule::addFuelEvents(OutputSignalList *sourceList, injection_mode_e mode DECLARE_ENGINE_PARAMETER_S) {
|
void FuelSchedule::addFuelEvents(OutputSignalList *sourceList, injection_mode_e mode DECLARE_ENGINE_PARAMETER_S) {
|
||||||
|
|
Loading…
Reference in New Issue