mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
69c86dcbdc
commit
efe7be54d0
|
@ -47,11 +47,12 @@ extern "C"
|
||||||
void scheduleOutput(OutputSignal *signal, float delayMs, float durationMs);
|
void scheduleOutput(OutputSignal *signal, float delayMs, float durationMs);
|
||||||
|
|
||||||
void initSignalExecutor(void);
|
void initSignalExecutor(void);
|
||||||
void initSignalExecutorImpl(void);
|
|
||||||
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param);
|
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
void initSignalExecutorImpl(void);
|
||||||
|
|
||||||
#endif /* SPARKOUT_H_ */
|
#endif /* SPARKOUT_H_ */
|
||||||
|
|
|
@ -144,7 +144,7 @@ void scheduleTask(const char *prefix, scheduling_s *scheduling, int delayUs, sch
|
||||||
instance.schedule(scheduling, getTimeNowUs(), delayUs, callback, param);
|
instance.schedule(scheduling, getTimeNowUs(), delayUs, callback, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
void scheduleTask2(const char *prefix, scheduling_s *scheduling, uint64_t time, schfunc_t callback, void *param) {
|
void scheduleByTime(const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
|
||||||
scheduling->name = prefix;
|
scheduling->name = prefix;
|
||||||
instance.schedule2(scheduling, time, callback, param);
|
instance.schedule2(scheduling, time, callback, param);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Executor {
|
||||||
public:
|
public:
|
||||||
Executor();
|
Executor();
|
||||||
void schedule(scheduling_s *scheduling, uint64_t nowUs, int delayUs, schfunc_t callback, void *param);
|
void schedule(scheduling_s *scheduling, uint64_t nowUs, int delayUs, schfunc_t callback, void *param);
|
||||||
void schedule2(scheduling_s *scheduling, uint64_t timeUs, schfunc_t callback, void *param);
|
void schedule2(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param);
|
||||||
void onTimerCallback();
|
void onTimerCallback();
|
||||||
private:
|
private:
|
||||||
EventQueue queue;
|
EventQueue queue;
|
||||||
|
@ -23,15 +23,6 @@ private:
|
||||||
void doExecute();
|
void doExecute();
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
void initSignalExecutorImpl(void);
|
void initSignalExecutorImpl(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* SINGLETIMEREXECUTOR_H_ */
|
#endif /* SINGLETIMEREXECUTOR_H_ */
|
||||||
|
|
|
@ -141,7 +141,7 @@ static efitimeus_t togglePwmState(PwmConfig *state) {
|
||||||
*/
|
*/
|
||||||
static void timerCallback(PwmConfig *state) {
|
static void timerCallback(PwmConfig *state) {
|
||||||
efitimeus_t switchTimeUs = togglePwmState(state);
|
efitimeus_t switchTimeUs = togglePwmState(state);
|
||||||
scheduleTask2("pwm", &state->scheduling, switchTimeUs, (schfunc_t) timerCallback, state);
|
scheduleByTime("pwm", &state->scheduling, switchTimeUs, (schfunc_t) timerCallback, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,6 +25,6 @@ struct scheduling_struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
void scheduleTask(const char *prefix, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param);
|
void scheduleTask(const char *prefix, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param);
|
||||||
void scheduleTask2(const char *prefix, scheduling_s *scheduling, uint64_t time, schfunc_t callback, void *param);
|
void scheduleByTime(const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param);
|
||||||
|
|
||||||
#endif /* SCHEDULER_H_ */
|
#endif /* SCHEDULER_H_ */
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#if EFI_SIGNAL_EXECUTOR_SLEEP || defined(__DOXYGEN__)
|
#if EFI_SIGNAL_EXECUTOR_SLEEP || defined(__DOXYGEN__)
|
||||||
|
|
||||||
void scheduleTask2(const char *prefix, scheduling_s *scheduling, uint64_t time, schfunc_t callback, void *param) {
|
void scheduleByTime(const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
|
||||||
scheduleTask(prefix, scheduling, time - getTimeNowUs(), callback, param);
|
scheduleTask(prefix, scheduling, time - getTimeNowUs(), callback, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,5 +262,5 @@ int getRusEfiVersion(void) {
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE == 0)
|
if (UNUSED_CCM_SIZE == 0)
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
return 20150118;
|
return 20150119;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue