reset virtual channels when session is reset

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
tylerjw
Posts: 10
Joined: Sat Jan 05, 2019 7:21 pm

reset virtual channels when session is reset

Post by tylerjw »

How do I reset values when the session is reset?

I am trying to make a fuel remaining / fuel consumed channel and I want to reset it's value when we add fuel to the car.

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

Post by brentp »

Hi, when you say "the session is reset" do you mean, when the button on app is pressed to reset the session?

One thing you can do is check the SessionTime channel. If the session is reset, the SessionTime is reset to 0. You can check for this in your Lua script and take appropriate action.

Hope this helps, let us know what you figure out!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply