merge rusEFI wiki

This commit is contained in:
GitHub Action 2022-10-28 22:05:23 +00:00
commit 79a47fdd2e
1 changed files with 8 additions and 6 deletions

View File

@ -418,9 +418,12 @@ end
```lua
vssSensor = Sensor.new("VehicleSpeed")
function onTick()
vssSensor : set(90)
val = getSensor("VehicleSpeed")
print ("VSS " .. val)
injectedVssValue = 123.4;
vssSensor : set(injectedVssValue)
-- here we would read the value we have just injected into the sensor.
valFromSensor = getSensor("VehicleSpeed")
-- we expect output to be "VSS 123.4"
print ("VSS " .. valFromSensor)
end
@ -432,12 +435,11 @@ canRxAdd(0x500)
canRxAdd(0x570)
function onCanRx(bus, id, dlc, data)
print('got CAN id=' ..id ..' dlc=' ..dlc)
id11 = id % 2048
if id11 == 0x500 then
if id == 0x500 then
-- Check can state of BCM
canState = data[1]
end
if id11 == 0x570 then
if id == 0x570 then
mcu_standby()
end
end