This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slcan = 1 | |
function splitWord(value) | |
return bit.band(value, 0xFF), bit.rshift(bit.band(value, 0xFF00),8) | |
end | |
function sl_cfgAlert(id, threshId, threshold, red, green, blue, flash) | |
local lowt | |
local hight | |
lowt, hight = splitWord(threshold) | |
txCAN(slcan, 744389 + 12, 1, {id, threshId, lowt, hight, red, green, blue, flash}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--500K baud. set your baud rate here. | |
initCAN(0, 500000) | |
--standard 11 bit PID request 0x7DF | |
--extended 29 bit PID request 0x18DB33F1 | |
--standard 11 bit PID response 0x7E8 | |
--extended 29 bit PID response 0x18DAF110 | |
standard = false | |
--this function drains all pending CAN messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shiftx_can = 1 | |
shiftx_id = 0xE3700 | |
function shiftx_tx(offset, data) | |
txCAN(shiftx_can, shiftx_id + offset, 1, data) | |
sleep(10) | |
end | |
function splitWord(value) | |
return bit.band(value, 0xFF), bit.rshift(bit.band(value, 0xFF00),8) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--this script adequately simulates varying speeds and periodic pit stops | |
--disable all GPS channels | |
--disable lap timing | |
shiftx_can = 1 | |
shiftx_id = 0xE3700 | |
dist = 0 | |
speed = 30 | |
speedDir = 0 | |
maxSpeedDir = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shiftx_can = 1 | |
shiftx_id = 0xE3700 | |
function shiftx_tx(offset, data) | |
txCAN(shiftx_can, shiftx_id + offset, 1, data) | |
sleep(10) | |
end | |
function splitWord(value) | |
return bit.band(value, 0xFF), bit.rshift(bit.band(value, 0xFF00),8) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shiftx_can = 1 | |
shiftx_id = 0xE3700 | |
function shiftx_tx(offset, data) | |
txCAN(shiftx_can, shiftx_id + offset, 1, data) | |
sleep(10) | |
end | |
function splitWord(value) | |
return bit.band(value, 0xFF), bit.rshift(bit.band(value, 0xFF00),8) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sxCan = 0 | |
sxId=0 | |
tickRate=30 | |
sxBright=0 | |
function rndc() | |
return math.random(0,255) | |
end | |
function sxOnUpdate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sxCan = 0 | |
sxId=0 | |
tickRate=30 | |
sxBright=0 | |
r = 0 | |
g = 0 | |
b = 0 | |
step = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--500K baud. set your baud rate here. | |
initCAN(0, 500000) | |
--standard 11 bit PID request 0x7DF | |
--extended 29 bit PID request 0x18DB33F1 | |
--standard 11 bit PID response 0x7E8 | |
--extended 29 bit PID response 0x18DAF110 | |
standard = false | |
--this function drains all pending CAN messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Lap simulator script | |
--Ensure GPS Distance channel is disabled | |
--Ensure Race Timing is disabled | |
--Requires a GPS lock for proper operation | |
--sets the length of the lap desired, in miles. | |
lapLength = 1 | |
setTickRate(10) |