From efe7be54d03d7b1b2781b8ec0ea90d8fc29c1d49 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 19 Jan 2015 13:04:10 -0600 Subject: [PATCH] auto-sync --- firmware/controllers/algo/signal_executor.h | 3 ++- firmware/controllers/system/SingleTimerExecutor.cpp | 2 +- firmware/controllers/system/SingleTimerExecutor.h | 11 +---------- firmware/controllers/system/pwm_generator_logic.cpp | 2 +- firmware/controllers/system/scheduler.h | 2 +- firmware/controllers/system/signal_executor_sleep.cpp | 2 +- firmware/rusefi.cpp | 2 +- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/firmware/controllers/algo/signal_executor.h b/firmware/controllers/algo/signal_executor.h index 25d684ee17..bd58c17fbe 100644 --- a/firmware/controllers/algo/signal_executor.h +++ b/firmware/controllers/algo/signal_executor.h @@ -47,11 +47,12 @@ extern "C" void scheduleOutput(OutputSignal *signal, float delayMs, float durationMs); void initSignalExecutor(void); -void initSignalExecutorImpl(void); void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param); #ifdef __cplusplus } #endif /* __cplusplus */ +void initSignalExecutorImpl(void); + #endif /* SPARKOUT_H_ */ diff --git a/firmware/controllers/system/SingleTimerExecutor.cpp b/firmware/controllers/system/SingleTimerExecutor.cpp index 693edb779a..dd155f37d5 100644 --- a/firmware/controllers/system/SingleTimerExecutor.cpp +++ b/firmware/controllers/system/SingleTimerExecutor.cpp @@ -144,7 +144,7 @@ void scheduleTask(const char *prefix, scheduling_s *scheduling, int delayUs, sch 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; instance.schedule2(scheduling, time, callback, param); } diff --git a/firmware/controllers/system/SingleTimerExecutor.h b/firmware/controllers/system/SingleTimerExecutor.h index 236f071c1d..06cfd4e312 100644 --- a/firmware/controllers/system/SingleTimerExecutor.h +++ b/firmware/controllers/system/SingleTimerExecutor.h @@ -15,7 +15,7 @@ class Executor { public: Executor(); 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(); private: EventQueue queue; @@ -23,15 +23,6 @@ private: void doExecute(); }; -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - void initSignalExecutorImpl(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* SINGLETIMEREXECUTOR_H_ */ diff --git a/firmware/controllers/system/pwm_generator_logic.cpp b/firmware/controllers/system/pwm_generator_logic.cpp index c878735e36..5ab1df7841 100644 --- a/firmware/controllers/system/pwm_generator_logic.cpp +++ b/firmware/controllers/system/pwm_generator_logic.cpp @@ -141,7 +141,7 @@ static efitimeus_t togglePwmState(PwmConfig *state) { */ static void timerCallback(PwmConfig *state) { efitimeus_t switchTimeUs = togglePwmState(state); - scheduleTask2("pwm", &state->scheduling, switchTimeUs, (schfunc_t) timerCallback, state); + scheduleByTime("pwm", &state->scheduling, switchTimeUs, (schfunc_t) timerCallback, state); } /** diff --git a/firmware/controllers/system/scheduler.h b/firmware/controllers/system/scheduler.h index f886210937..85cc749a61 100644 --- a/firmware/controllers/system/scheduler.h +++ b/firmware/controllers/system/scheduler.h @@ -25,6 +25,6 @@ struct scheduling_struct { }; 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_ */ diff --git a/firmware/controllers/system/signal_executor_sleep.cpp b/firmware/controllers/system/signal_executor_sleep.cpp index 292839e3a6..4b3b74662a 100644 --- a/firmware/controllers/system/signal_executor_sleep.cpp +++ b/firmware/controllers/system/signal_executor_sleep.cpp @@ -28,7 +28,7 @@ #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); } diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 53a4b00d58..c60afdeed9 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -262,5 +262,5 @@ int getRusEfiVersion(void) { return 1; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE == 0) return 1; // this is here to make the compiler happy about the unused array - return 20150118; + return 20150119; }