Page 1 of 1

Rules for channel names

Posted: Thu Apr 27, 2017 6:33 pm
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?

Posted: Fri Apr 28, 2017 5:10 pm
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!

Posted: Mon May 01, 2017 6:17 pm
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.

Posted: Thu May 04, 2017 4:26 pm
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.