RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Lua variable errors
Author Message
Reply with quote
Post Lua variable errors 
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:

Code:
function onTick()
  varA=0
end


I write this to the RCP, reboot the RCP and and read it again from the RCP and RA shows this:

Quote:
"function onTick()
varA


This also happens when trying to set a variable to the output of a function:

Code:
function onTick()
  varB = getGpsSpeed()
end


becomes:
Quote:
"function onTick()
varB


RCP firmware 1.2.6
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!

View user's profile Send private message
Reply with quote
Post  
Hey redparchel, this looks like a bug in RaceAnalyzer. Not sure why it's clobbering your Lua script. I'll look into it more.


_________________
Ryan Doherty
Autosports Labs
View user's profile Send private message
Reply with quote
Post  
Hi, redparchel - we're working on that very problem. Thanks for your patience and hang tight for an update!


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Most excellent! Thanks for looking into this.

View user's profile Send private message
Reply with quote
Post  
Be sure to get v1.2.8 firmware and the latest version of RCP - we've made many improvements around this area.


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Running 1.2.8 and 1.1.15, still can't get it to write properly. If anything is in the onTick() function, the write "fails" at 96%. The read back results in a truncation of what I tried to write and a random string of garbage. If I have a blank onTick(), then write completes 100% okay.

View user's profile Send private message
Reply with quote
Post  
Hi mattlqx,

We've identified the problem you're seeing in the 1.2.8 firmware and we have a preliminary fix in the V2 beta firmware, where we've fixed the lua script read/write routine.

Stay tuned for that release coming up in a few days - thanks for your patience!

-Brent


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum