Rules for channel names

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
TXBDan
Posts: 68
Joined: Sat Mar 25, 2017 1:43 am

Rules for channel names

Post by TXBDan »

I'm confused about the interaction of default sensor names like "Brake" or "RPM" and the names for virtual channels created in LUA scripts. It seems that virtual channels override default channel names? Also seems like if they do, they take on the properties of the default name's channel? What if i rename a sensor input name to be a channel name that already exists? Can I delete a default name? What if i want MY Speed from my speed sensor to be Speed and not the default Speed that uses GPS?

What's the best practice?

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

Post by brentp »

The best practice is to use unique channel names for all of your channels. Otherwise, you'll have the same channel name showing up in the data stream, and it will not be predictable which actual channel is selected by upstream systems.

The dropdown channel names you see in the app simply are provided as a canonical list of channel presets. e.g. if you select oil pressure, then the min / max, units and precision are set to commonly known values. They can be edited after that.

Likewise, you can create a virtual channel in Lua where you can specify the channel name, units, precision, min and max, and it shows up just like it would as one of the regular channels. See the Lua scripting api on our wiki for how those channels are defined.

Hope that helps clarify things!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

TXBDan
Posts: 68
Joined: Sat Mar 25, 2017 1:43 am

Post by TXBDan »

I see. It'd be cool if you could change the displayed channel name in the dashboard gauge. One of the cons to making a new name "Speed1" or "SpeedDan" instead of the default "Speed" is that it uglys up the gauges.

Is there a way i could rename the default GPS based speed name to something else? I don't want to lose the information.

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

Post by brentp »

Hi Dan;

The system relies on the Speed channel for various calculations; currently GPS is fixed to 'Speed' as a system-level channel.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply