Help need for AutoX Logging on/off Script and Logging LED
Posted: Tue Mar 26, 2013 3:42 am
As far as LUA scripting goes, I've seen the example where you use getGpsSpeed(), is there a list of the other functions available? For instance I'm looking at doing something like the following:
So if the logger is active it will stop logging when speed reaches 0. If the logger is not active it will start logging if the speed is at 0 and the RPM's are over 5000 which should be launch conditions. I also want to set up some remote LED that I can turn on and off in the code to let me see from the driver seat if logging is on or off, not sure if the syntax above would be accurate assuming its a digital out. Also... its been years since I've worked with electronics, what would I need to do to set up an LED off of a digital out on the RCP? Do I just need to connect the positive lead to a wire going to the RCP, and the negative lead to the same ground as the RCP through a 1k resistor or do I need any additional resistance or capacitors in parallel or series? I swear eventually some of my old electronics knowledge will come back.. lol.
Code: Select all
function onTick()
if logging() and (getGpsSpeed() == 0) then
stopLogging()
setLoggingLight(FALSE)
end
if not logging() and getGpsSpeed() == 0 and getRpm() > 5000 then
startLogging()
setLoggingLight(TRUE)
end
end