Updated Lua Scripting (markdown)

This commit is contained in:
rusefillc 2022-07-20 07:30:37 -04:00
parent 5e23e81b60
commit 47722a9c4b
1 changed files with 7 additions and 1 deletions

View File

@ -209,7 +209,7 @@ Puts MCU into standby low current consumption mode.
Reads the specified sensor. Reads the specified sensor.
- Parameters - Parameters
- `name`: Name of the sensor to read. [A list of sensor indices can be found here.](https://github.com/rusefi/rusefi/blob/master/firmware/controllers/sensors/sensor_type.h) - `name`: Name of the sensor to read. [A list of sensor names can be found here.](https://github.com/rusefi/rusefi/blob/master/firmware/controllers/sensors/sensor_type.h)
- Returns - Returns
- A reading from the sensor, or `nil` if the sensor has a problem or isn't configured. - A reading from the sensor, or `nil` if the sensor has a problem or isn't configured.
@ -379,6 +379,12 @@ function onTick()
end end
``` ```
# set sensor value
```
vssSensor = Sensor.new("VSS");
vssSensor.set(90)
```
# CAN receive # CAN receive
``` ```
canRxAdd(0x500) canRxAdd(0x500)