merge rusEFI wiki
This commit is contained in:
commit
acac3c2755
|
@ -203,14 +203,26 @@ Set the duty cycle of the specified PWM channel.
|
||||||
|
|
||||||
```
|
```
|
||||||
t = Timer.new();
|
t = Timer.new();
|
||||||
|
timingAdd = 0;
|
||||||
|
|
||||||
function onTick()
|
function onTick()
|
||||||
auxV = getAuxAnalog(0)
|
auxV = getAuxAnalog(0)
|
||||||
|
tps = getSensor(10)
|
||||||
|
-- todo: check for NIL value which is a sign of analog input not assigned in TS
|
||||||
if auxV > 2 then
|
if auxV > 2 then
|
||||||
t:reset();
|
t:reset();
|
||||||
end
|
end
|
||||||
|
|
||||||
val = t:getElapsedSeconds();
|
val = t:getElapsedSeconds();
|
||||||
|
|
||||||
|
if t:getElapsedSeconds() < 3 then
|
||||||
|
timingAdd = 10;
|
||||||
|
else
|
||||||
|
timingAdd = 0;
|
||||||
|
end
|
||||||
|
setTimingAdd(timingAdd)
|
||||||
|
|
||||||
|
|
||||||
print('Hello analog ' .. auxV .. " " .. val)
|
print('Hello analog ' .. auxV .. " " .. val)
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue