From b63fe4456e921ccb494d5700e3543c96511dac0c Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 7 Jul 2016 20:02:39 -0400 Subject: [PATCH] auto-sync --- firmware/chibios/os/kernel/include/chvt.h | 2 ++ firmware/controllers/injector_central.cpp | 6 +++--- firmware/rusefi.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/firmware/chibios/os/kernel/include/chvt.h b/firmware/chibios/os/kernel/include/chvt.h index 38f15045c5..506cd45b60 100644 --- a/firmware/chibios/os/kernel/include/chvt.h +++ b/firmware/chibios/os/kernel/include/chvt.h @@ -58,6 +58,8 @@ * @details Converts from milliseconds to system ticks number. * @note The result is rounded upward to the next tick boundary. * + * WARNING! this macro does evil things in case of zero parameter! + * * @param[in] msec number of milliseconds * @return The number of ticks. * diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/injector_central.cpp index 6f381dae5d..406ec05951 100644 --- a/firmware/controllers/injector_central.cpp +++ b/firmware/controllers/injector_central.cpp @@ -79,9 +79,9 @@ static void setInjectorEnabled(int id, int value) { static void runBench(brain_pin_e brainPin, OutputPin *output, float delayMs, float onTimeMs, float offTimeMs, int count) { - int delaySt = MS2ST(delayMs); - int onTimeSt = MS2ST(onTimeMs); - int offTimeSt = MS2ST(offTimeMs); + int delaySt = delayMs < 1 ? 1 : MS2ST(delayMs); + int onTimeSt = onTimeMs < 1 ? 1 : MS2ST(onTimeMs); + int offTimeSt = offTimeMs < 1 ? 1 : MS2ST(offTimeMs); if (delaySt < 0) { scheduleMsg(logger, "Invalid delay %f", delayMs); return; diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 92745fb3da..e703b33c2a 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -298,5 +298,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20160706; + return 20160707; }