RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Auto Logging from start to finish of laps
Author Message
Reply with quote
Post Auto Logging from start to finish of laps 
Hi Guys,
Can anyone help with the correct script, I'm trying to set up the auto logging to start recording at the beginning of a lap & finish at the end of a lap. Cheers.



Last edited by Dirty Deeds on Sat Oct 08, 2016 5:37 pm; edited 1 time in total

_________________
Get in, Hold on , Shut up & pass me my Beer!
View user's profile Send private message Visit poster's website AIM Address
Reply with quote
Post  
What kind of event are you doing? Based on the requirements I'd guess you're autocrossing, is that right?

View user's profile Send private message
Reply with quote
Post  
There are a handful of options here - https://wiki.autosportlabs.com/RaceCapturePro_Lua_Scripting_Examples I have the battery-voltage version working on my Mk1 hardware. I'm having trouble combining it with reading/logging CANBus channels though. Mk1 has limited script memory available...
Code:
function onTick()
  if getAnalog(7) > 13 then
    startLogging()
  else
    stopLogging()
  end
end

I don't mind having some excess non-moving data before and after each run. I prefer that to using a GPS speed trigger, so I don't miss the beginning of the run. Some of our starts have a 90-degree bend before the timing lights, to encourage less speed/burnouts at start, to reduce damage to our parking lot.


_________________
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
View user's profile Send private message
Reply with quote
Post  
You could combine the start/stop logging examples with the function getAtStartFinish() https://wiki.autosportlabs.com/RaceCapturePro_Lua_Scripting#getAtStartFinish.28.29

Although I am unsure if that function will return true for a separate start and finish line. You will need some extra code to handle state too.


_________________
Ryan Doherty
Autosports Labs
View user's profile Send private message
Reply with quote
Post  
Thanks guys, we're running jet sprint boats & have tried using auto log Lau with speed & rpm, but we seem to log a lot of small files when warming up etc. making it hard to determine which files are actually laps. Would something like this work? :


function onTick()
if getAtStartFinish() = start
startLogging()
else
if getAtStartFinish() = finish
end
end


_________________
Get in, Hold on , Shut up & pass me my Beer!
View user's profile Send private message Visit poster's website AIM Address
Reply with quote
Post  
You might try that out - just ensure you have your tick rate set to 10Hz or higher, so it has a chance to catch it in the start finish point.

let us know how it goes!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum