This commit is contained in:
parent
051775bad2
commit
22d1c08ddc
|
@ -45,7 +45,10 @@ static msg_t seThread(void *arg) {
|
||||||
chRegSetThreadName("servo");
|
chRegSetThreadName("servo");
|
||||||
while (true) {
|
while (true) {
|
||||||
pin.setValue(1);
|
pin.setValue(1);
|
||||||
float durationMs = 1.3;
|
|
||||||
|
percent_t position = 10 * (getTimeNowSeconds() % 10);
|
||||||
|
|
||||||
|
float durationMs = 1 + position * 0.01;
|
||||||
|
|
||||||
scheduleForLater(&servoTurnSignalOff, (int)MS2US(durationMs), (schfunc_t) &servoTachPinLow, NULL);
|
scheduleForLater(&servoTurnSignalOff, (int)MS2US(durationMs), (schfunc_t) &servoTachPinLow, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue