merge rusEFI wiki
This commit is contained in:
commit
79a47fdd2e
|
@ -418,9 +418,12 @@ end
|
||||||
```lua
|
```lua
|
||||||
vssSensor = Sensor.new("VehicleSpeed")
|
vssSensor = Sensor.new("VehicleSpeed")
|
||||||
function onTick()
|
function onTick()
|
||||||
vssSensor : set(90)
|
injectedVssValue = 123.4;
|
||||||
val = getSensor("VehicleSpeed")
|
vssSensor : set(injectedVssValue)
|
||||||
print ("VSS " .. val)
|
-- 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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -432,12 +435,11 @@ canRxAdd(0x500)
|
||||||
canRxAdd(0x570)
|
canRxAdd(0x570)
|
||||||
function onCanRx(bus, id, dlc, data)
|
function onCanRx(bus, id, dlc, data)
|
||||||
print('got CAN id=' ..id ..' dlc=' ..dlc)
|
print('got CAN id=' ..id ..' dlc=' ..dlc)
|
||||||
id11 = id % 2048
|
if id == 0x500 then
|
||||||
if id11 == 0x500 then
|
|
||||||
-- Check can state of BCM
|
-- Check can state of BCM
|
||||||
canState = data[1]
|
canState = data[1]
|
||||||
end
|
end
|
||||||
if id11 == 0x570 then
|
if id == 0x570 then
|
||||||
mcu_standby()
|
mcu_standby()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue