RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
scriping only working when PC attached
Author Message
Reply with quote
Post scriping only working when PC attached 
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?


_________________
Thanks,
Anastos
View user's profile Send private message
Reply with quote
Post  
I forgot to mention it, but yes I did perform the write to controller operation after changing the script.


_________________
Thanks,
Anastos
View user's profile Send private message
Reply with quote
Post  
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.


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post 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.


_________________
Thanks,
Anastos
View user's profile Send private message
Reply with quote
Post  
Ok.

Try this:

* erase the script completely and write it back to RCP
* disconnect USB
* apply 12v pwer
* press the 'action button'. Do you see the logging LED flash?
* press it again. Does it stop?


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
I will have to try that next weekend.
The car is at a fabrication shop this week.

Thanks for the prompt reply.

We are racing July 8 & 9 hope to have this resolved before then.
Are there any bug fixes in 10.0.1 related to SD card logging?
I have not tried that version yet.


_________________
Thanks,
Anastos
View user's profile Send private message
Reply with quote
Post  
I erased script and rewrote as suggested.
The SD card starts logging when button pushed, does not stop logging if pushed again.


_________________
Thanks,
Anastos
View user's profile Send private message
Reply with quote
Post  
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?


_________________
Thanks,
Anastos
View user's profile Send private message
Reply with quote
Post  
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?

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