Page 1 of 1

Bug with scripting box in 1.10

Posted: Wed Jun 05, 2013 7:23 pm
by sbarton
I noticed that in the new version of Race Analyzer 1.10 that there seems to be a bug in the scripting window. When reading or importing a config into the system, instead of replacing the default value of
function onTick()
end

It prepends the imported script and appends function onTick() end at the end, messing up the imported script.

-Scott

Posted: Wed Jun 05, 2013 7:27 pm
by sbarton
Steps to repruce:

Create a new config and change the script to:

function onTick()
if getGpsSpeed() > 10 then
startLogging()
else
stopLogging()
end
end

Save the config and close RA.
Open RA with default configs.
Click on Scripting and see default of: function onTick() end
Click on a different tab, other than scripting
Open your saved config file.
Click on Scrpting and see:

function onTick()
if getGpsSpeed() > 10 then
startLogging()
else
stopLogging()
end
endfunction onTick() end

Posted: Wed Jun 05, 2013 10:52 pm
by rdoherty
Thanks Scott! Having steps to reproduce is really handy.

Posted: Fri Jun 21, 2013 3:34 am
by mattlqx
I can report the same issue. I was using 1.1.11 and 1.1.12. Same thing. When I'd read the config back after writing, a lot of times it'd lead to some binary stuff at the end of the script.

It also led to some really wonky behavior when I tried to read and then write the config. The RC would go unresponsive on power-up. I reflashed the firmware to get it back working again.

I found that putting the script on the first line and not using newlines helped but still this is suboptimal.

Posted: Wed Jun 26, 2013 6:46 am
by brentp
Hi guys,

Thanks for the info. We'll look at this closely. If you catch any more repro details please post it here.

Thanks,

Posted: Thu Jul 18, 2013 6:48 pm
by sbarton
mattlqx wrote:I can report the same issue. I was using 1.1.11 and 1.1.12. Same thing. When I'd read the config back after writing, a lot of times it'd lead to some binary stuff at the end of the script.

It also led to some really wonky behavior when I tried to read and then write the config. The RC would go unresponsive on power-up. I reflashed the firmware to get it back working again.

I found that putting the script on the first line and not using newlines helped but still this is suboptimal.
I found copying my script into a notepad and editing it there with newline and tab formatting and then copy/paste back into RA also made it a little better.

Posted: Thu Jul 18, 2013 6:53 pm
by sbarton
This error still happens. For now, can you leave the default blank instead of
function onTick() end

-Scott