Hi All,
I have been trying to get RCP Mk3 to perform automatic SD card data logging but have not been successful.
I made it as simple as possible entering "startLogging()" in the onTick function and discovered that it only works when my PC is attached to RCP via USB. If I disconnect the PC logging never starts. Also I was somewhat surprised when at the track last weekend by the overall operation of SD card logging. I rewired the power supply for RCP to be hot whenever the battery disconnect switch was on and started logging with the action button while the car was still in the paddock. I did this because it is sometimes necessary to switch off the engine while waiting on the grid before the race starts, previously RCP power was via ignition switch. Anyway after the race I found two logs on the card one that I started and one that started by itself after the car was restarted on the grid. (There was no remaining script to control logging in my setup, other than "if getActionButton() > 0 then startLogging() end", which was not pressed a second time). Is there built-in code that causes this behavior?
scriping only working when PC attached
scriping only working when PC attached
Thanks,
Anastos
Anastos
Hi, Unfortunately it was a bit hard to follow your post, sorry.
Can you post your current script here so we can look at it?
When the unit is logging it will flash the logging LED on the unit. It does not need the USB connection to do that.
The front panel button is like a logging override; it will start logging if it is not running, and will stop it if it is running.
Can you post your current script here so we can look at it?
When the unit is logging it will flash the logging LED on the unit. It does not need the USB connection to do that.
The front panel button is like a logging override; it will start logging if it is not running, and will stop it if it is running.
scripting only working when PC attached
Here is the script I am currently using.
I tried
Removing;
"function lgStart()
if getButton() > 0 then
startLogging()
end
end"
And going with;
"function onTick()
processCAN(CAN_chan)
startLogging()
end"
That is when RCP logged to SD card while PC attached, but not if PC disconnected.
I tried
Removing;
"function lgStart()
if getButton() > 0 then
startLogging()
end
end"
And going with;
"function onTick()
processCAN(CAN_chan)
startLogging()
end"
That is when RCP logged to SD card while PC attached, but not if PC disconnected.
- Attachments
-
- RCP_Script.txt
- script currently being used, requires action button input to log on SD card.
- (1.86 KiB) Downloaded 89 times
Thanks,
Anastos
Anastos
I found that the button is not responsive, I sometimes need to press it multiple times in order to initiate SD card logging.
So I tried once again the following script
function onTick()
processCAN(CAN_chan)
startLogging()
end
It worked once and then never again.
I updated the Race capture software and the RCP firmware.
Tried again - did not work.
Any suggestions?
So I tried once again the following script
function onTick()
processCAN(CAN_chan)
startLogging()
end
It worked once and then never again.
I updated the Race capture software and the RCP firmware.
Tried again - did not work.
Any suggestions?
Thanks,
Anastos
Anastos
Hi,
I think the issue you're seeing is 'switch bounce' which is caused by the firmware being too sensitive to the switch contacts literally bouncing from the spring action.
You should be able to overcome this with a slow deliberate press, but this is definitely not ideal.
The upcoming 2.12.0 firmware which we will have in beta test soon fixes the bounce issue and you'll be able to log using the front panel switch.
Question around your script - if you temporarily disable the processCAN() function by commenting it out by prefixing it with -- ; e.g.
function onTick()
--processCAN(CAN_chan)
startLogging()
end
do you see it logging?
I think the issue you're seeing is 'switch bounce' which is caused by the firmware being too sensitive to the switch contacts literally bouncing from the spring action.
You should be able to overcome this with a slow deliberate press, but this is definitely not ideal.
The upcoming 2.12.0 firmware which we will have in beta test soon fixes the bounce issue and you'll be able to log using the front panel switch.
Question around your script - if you temporarily disable the processCAN() function by commenting it out by prefixing it with -- ; e.g.
function onTick()
--processCAN(CAN_chan)
startLogging()
end
do you see it logging?