auto-sync

This commit is contained in:
rusEfi 2016-09-04 17:03:09 -04:00
parent ae9e1c0f0d
commit f874ce0bb1
3 changed files with 7 additions and 3 deletions

View File

@ -39,6 +39,7 @@ struct OutputSignal_struct {
};
void scheduleOutput2(scheduling_s * sUp, scheduling_s * sDown, efitimeus_t nowUs, float delayUs, float durationUs, InjectorOutputPin *output);
void seScheduleByTime(const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, NamedOutputPin *param);
void initSignalExecutor(void);
void initEnginePinsNames(void);

View File

@ -122,14 +122,13 @@ static void scheduleFuelInjection(int eventIndex, OutputSignal *signal, efitimeu
}
#endif
// todo: point at 'seScheduleByTime'
if (isSecondaryOverlapping) {
output->cancelNextTurningInjectorOff = true;
} else {
scheduleByTime("out up", sUp, turnOnTime, (schfunc_t) &seTurnPinHigh, output);
seScheduleByTime("out up", sUp, turnOnTime, (schfunc_t) &seTurnPinHigh, output);
}
efitimeus_t turnOffTime = nowUs + (int) (delayUs + durationUs);
scheduleByTime("out down", sDown, turnOffTime, (schfunc_t) &seTurnPinLow, output);
seScheduleByTime("out down", sDown, turnOffTime, (schfunc_t) &seTurnPinLow, output);
}
static ALWAYS_INLINE void handleFuelInjectionEvent(int eventIndex, InjectionEvent *event,

View File

@ -119,7 +119,11 @@
#include "engine_emulator.h"
#endif /* EFI_ENGINE_EMULATOR */
#if FUEL_MATH_EXTREME_LOGGING
LoggingWithStorage sharedLogger("main");
#else
static LoggingWithStorage sharedLogger("main");
#endif /* FUEL_MATH_EXTREME_LOGGING */
bool main_loop_started = false;