Lua variable errors
Posted: Sat Feb 15, 2014 2:31 am
I'm running into something that I'm unsure if it's a known limitation of this implementation of lua, my set up, or me just doing it wrong. When trying to use variables in the lua scripting my code fails to upload to the RCP correctly. I see that using vars should be possible as they're used on the latest Facebook posts about the shift light, but I know it's completely possible they're using a sweet new unreleased/undocumented firmware. some examples of my attempts:
I write this to the RCP, reboot the RCP and and read it again from the RCP and RA shows this:
becomes:
RA v1.1.14
Windows XP (it's the only windows box I have)
Sidenote: is there a method of logging output somewhere from lua, like a println to the logs for trouble shooting (i saw this mentioned on the forums as an idea but not if it had made it in as a feature)
thanks!
Code: Select all
function onTick()
varA=0
end
This also happens when trying to set a variable to the output of a function:"function onTick()
varA
Code: Select all
function onTick()
varB = getGpsSpeed()
end
RCP firmware 1.2.6"function onTick()
varB
RA v1.1.14
Windows XP (it's the only windows box I have)
Sidenote: is there a method of logging output somewhere from lua, like a println to the logs for trouble shooting (i saw this mentioned on the forums as an idea but not if it had made it in as a feature)
thanks!