<precision> definition, space sensitivity, cancatenat

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
Mitch Detailed
Posts: 5
Joined: Tue Feb 07, 2017 4:29 am
Location: Murfreesboro TN
Contact:

<precision> definition, space sensitivity, cancatenat

Post by Mitch Detailed »

I had a few questions about the scripting that help me clarify the structure.

1. What exactly does <precision> do? And how do you determine what value of precision you choose?

2. Are spaces required in functions or mathematical equations? (1+2) vs. ( 1 + 2)...

3. If i have cancatenated messages that change wgat variables they define based on the first byte, how would I go about defining these variables in the script?

brentp
Site Admin
Posts: 5986
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

1) precision is the logged number of decimal places to report in the log file or over telemetry. 0 = log / broadcast whole numbers, 2 = two digits of precision (1.23) and so on.

2) spaces are not required. It's standard Lua syntax; so anything in the Lua syntax will work: https://www.lua.org/pil/1.html

3) I don't understand the question, sorry.

Post Reply