Skip to content

Instantly share code, notes, and snippets.

@brentpicasso
Created February 6, 2017 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brentpicasso/bb10380d570559fbce0cc6d700bded59 to your computer and use it in GitHub Desktop.
Save brentpicasso/bb10380d570559fbce0cc6d700bded59 to your computer and use it in GitHub Desktop.
ShiftX2 alert tester
setTickRate(30)
initCAN(0, 500000)
txCAN(0, 744389 + 12, 1, {0, 0, 5, 0, 0 , 255, 0, 0})
sleep(10)
txCAN(0, 744389 + 12, 1, {0, 1, 20, 0, 255, 0 , 0, 0})
sleep(10)
txCAN(0, 744389 + 12, 1, {1, 0, 5, 0, 0 , 255, 0, 0})
sleep(10)
txCAN(0, 744389 + 12, 1, {1, 1, 20, 0, 255, 0 , 0, 0})
sleep(10)
function onTick()
local yaw = math.abs(getImu(3))
local pitch = math.abs(getImu(4))
txCAN(0, 744389 + 13, 1, {0, yaw, 0})
txCAN(0, 744389 + 13, 1, {1, pitch, 0})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment