merge rusEFI wiki
This commit is contained in:
commit
79a47fdd2e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue