This commit is contained in:
rusefi 2018-03-17 21:51:46 -04:00
parent c446e4c666
commit a158113a0d
1 changed files with 5 additions and 2 deletions

View File

@ -51,9 +51,12 @@ static msg_t seThread(void *arg) {
while (true) {
pin.setValue(1);
percent_t position = 10 * (getTimeNowSeconds() % 11); // 0, 10, .., 90, 100
float durationMs = 1 + position * 0.01f;
percent_t position = (currentTimeMillis() / 5) % 200;
if (position > 100)
position = 200 - position;
float durationMs = 0 + position * 0.02f;
scheduleForLater(&servoTurnSignalOff, (int)MS2US(durationMs), (schfunc_t) &servoTachPinLow, NULL);