Virtual Channel for Logging on / logging off

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
FHB-PERFORMANCE
Posts: 24
Joined: Sun Mar 20, 2016 7:13 am
Location: Melbourne-Australia / Sao Paulo-Brazil

Virtual Channel for Logging on / logging off

Post by FHB-PERFORMANCE »

Hi guys,

I am trying to get a virtual channel that shows when I am logging or not. The reason is if I want to record a 1/4 mile for each run, I want to make sure on screen that I am recording or not. It is much easier then checking if the Logging LED is on or off once the RCP is on the car floor, in the back seat.

I created a script using "getButton()" but it just shows me when the Button is pressed and not if I am logging or not.

Is there any other command like "getLogging ()" that would show me when is logging or not?

My script is:
GravId = addChannel("Gravando",10,0,0,1,".rec")
function onTick()
local a3 = getButton()
setChannel(GravId, a3)
end

BTW: "Gravando" means logging in my language.

Thanks,
Felipe

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Currently there is no way to get the logging status in Lua, but that is a good idea! I will file a ticket for it. https://github.com/autosportlabs/RaceCa ... issues/849
Ryan Doherty
Autosports Labs

FHB-PERFORMANCE
Posts: 24
Joined: Sun Mar 20, 2016 7:13 am
Location: Melbourne-Australia / Sao Paulo-Brazil

Post by FHB-PERFORMANCE »

Hi Ryan,

Thanks for that! Actually it would be very handy if you have the file number showing on screen too.

Cheers
Felipe

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

Post by brentp »

Idea:

If you have the Lua script actually controlling the logging start/stop in an automatic way, then you will be able to track that state as well in the script, then set that to a virtual channel.

let us know how it goes!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

FHB-PERFORMANCE
Posts: 24
Joined: Sun Mar 20, 2016 7:13 am
Location: Melbourne-Australia / Sao Paulo-Brazil

Post by FHB-PERFORMANCE »

Hi Brent,

Actually I am not using the Lua script to start logging start/stop. I need to start recording around 3s before my test. For example, I have start logging and run the 1/4mile launch test. I need to collect the response delay from the accelerator pedal. All the car manufactures have a target for how much acceleration I need to have after certain time that the accelerator pedal was pressed, like 0.3s.

So, it would be very handy to have the file number on screen.

Thanks again,

Regards,
Felipe

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

Post by brentp »

Hi, actually, you can read the logging status within Lua, sorry for the confusion.

here is the method:
https://wiki.autosportlabs.com/RaceCapt ... ging.28.29
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply