Updated Lua Scripting (markdown)
This commit is contained in:
parent
762f7c0213
commit
ed8f1df5ad
|
@ -28,7 +28,7 @@ end
|
|||
|
||||
### Controlling the Tick Rate
|
||||
|
||||
The function `setTickRate(hz)` can be used to configure how often rusEFI calls the `onTick` function. If your script does a lot of work in the `onTick()` function it may run slower than the desired rate. Since the Lua virtual machine runs at low priority compared to other functions of the ECU, it is impossible to swamp the ECU with too much Lua work, so set the tick rate to whatever is necessary.
|
||||
The function `setTickRate(hz)` can be used to configure how often rusEFI calls the `onTick` function. If your script does a lot of work in the `onTick()` function it may run slower than the desired rate. Since the Lua virtual machine runs at low priority compared to other functions of the ECU, it is impossible to swamp the ECU with too much Lua work, so set the tick rate to whatever is necessary. `onCanRx` runs at the same rate as `onTick`
|
||||
|
||||
```
|
||||
n = 0
|
||||
|
@ -130,7 +130,7 @@ Output:
|
|||
|
||||
### `setTickRate(hz)`
|
||||
|
||||
Sets the rate at which rusEFI calls your `onTick` function, in hz. On reset default is 10hz.
|
||||
Sets the rate at which rusEFI calls your `onTick` and `onCanRx` functions, in hz. On reset default is 10hz.
|
||||
|
||||
- Parameters
|
||||
- `hz`: Desired tick rate, in hz. Values passed will be clamped to a minimum of 1hz, and maximum of 100hz.
|
||||
|
|
Loading…
Reference in New Issue