SD logging issue

General Q&A specific to RaceCapture/Pro. For app related questions post in the RaceCapture App forum. also see the <a href="http://www.autosportlabs.net/RaceCapture">RaceCapture Information Page</a>

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
torkey
Posts: 30
Joined: Tue Sep 22, 2015 3:09 am

SD logging issue

Post by torkey »

I was running RaceCapture MK1 at a track day at The Ridge. It more or less worked given the weak cell coverage at the track.
What didn't work was the logging to the SD card. The RCP was powered up for the whole day. When I looked at the SD card yesterday there were 38 log files, most of them less than 1MB. Also there were very few lattices captured on the SD.
Any ideas what would cause this and how can I fix it?

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post by stieg »

Hi Torkey,

Will you upload your config so we can have a look at what you have setup. How are you controlling the logging? Are you using LUA or the front button. Do you see the red light on on the front of the unit? Can you upload one of the failed log files? TIA.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

torkey
Posts: 30
Joined: Tue Sep 22, 2015 3:09 am

Post by torkey »

I'm using LUA scripting to automatically start logging. Attached is the RCP config and a sample log file.
Attachments
config.rcp.txt
(18.86 KiB) Downloaded 350 times
RC_38.LOG.txt
(205.31 KiB) Downloaded 290 times

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post by stieg »

Hey Torkey,

Looked at your Log file and config file... things looked OK except that your interval times (system uptime in millis) were quite low. Can you send me a couple other log files... I wonder if your unit is hitting an issue and resetting itself on track regularly.
torkey wrote:I'm using LUA scripting to automatically start logging. Attached is the RCP config and a sample log file.
Extracted your Lua script but all I saw was code that appeared to control a Shift-X board. Are you sure you sent me a config that represents what you had running? Sometimes with the logging starts and stops if the unit starts flapping between the two you can hit issues. One indication of this behavior could be log files that are all roughly the same size. It could indicate that something is causing logging to stop at the wrong time.
Also there were very few lattices captured on the SD.
What do you mean by this exactly?

Also I noticed that you are running 2.8.5 on your system? Are you aware that 2.8.7 is available for MK1 devices. Unless the config info is out of date I suggest you try updating. Might help.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

torkey
Posts: 30
Joined: Tue Sep 22, 2015 3:09 am

Post by torkey »

Damn auto correct! :-) I meant to say "not many lap times were captured".
The script isn't for the Shift-X. Instead, my script is used to control shifts lights and a pain siren. We're serious about over revving. :-)
Attached is another sample log file.
I really appreciate you taking the time to help with this.
Attachments
RC_42.LOG.txt
(242.41 KiB) Downloaded 305 times

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post by stieg »

Damn auto correct! Smile I meant to say "not many lap times were captured".
The script isn't for the Shift-X. Instead, my script is used to control shifts lights and a pain siren. We're serious about over revving. Smile
Attached is another sample log file.
I really appreciate you taking the time to help with this.
Ah... You run with the Dirty Little Freaks and the Dalek. Nice. We were checking out your setup at the Last Lucky Dog race. Love the idea of the pain siren....

Right... so a quick look at that log file confirms my suspicions... your unit seems to be resetting. Look at the channel on the far left, notice how its always counting up from a low value? The left most column always represents uptime, and the second left most column represents milliseconds since epoch (Jan 1, 1970 UTC). My guess is that if you were to look at all of your log files, you would see a similar trend in all of them.

So the first thing I would do is get on the latest version of RCP for MK1, which is 2.8.7. That has a lot of bug fixes in it for issues that were in 2.8.5 and 2.8.6. Second thing I would do is upload your full LUA script, including the bits that control the starting and stopping of the logging. I want to see if its possible that is causing an issue.

If you upload the whole config (with the LUA script) I can also drop it onto one of my MK1 units and see if I can isolate the issue further.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

torkey
Posts: 30
Joined: Tue Sep 22, 2015 3:09 am

Post by torkey »

Yep, I'm part of Dirty Little Freaks. Nice write up on your blog and thanks for the mention.

I will do the update to RCP this afternoon.

Here is my LUA script:

setTickRate(15)
function onTick()
startLogging()
local r = getTimerRpm(0)
if r > 7500 then return else end
if r > 4500 or getAnalog(0) > 218 then setGpio(0,1) else setGpio(0,0) end
if r > 4000 then setGpio(1,1) else setGpio(1,0) end
if r > 4500 then setGpio(2,1) else setGpio(2,0) end

end

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post by stieg »

Cool. Ok... while the use of startLogging that way is not optimal, it shouldn't hurt. If you are seeing this issue continue on 2.8.7 then I will load up this script and will try to reproduce this issue. Cheers.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

torkey
Posts: 30
Joined: Tue Sep 22, 2015 3:09 am

Post by torkey »

I just did the upgrade and will be doing a test later.

What is the optimal way to start logging?

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post by stieg »

What is the optimal way to start logging?
The way you have it now will cause our LuaScript to call into startLogging on every invocation of `onTick()` which happens 15 times a second. I would suggest you simply move that method outside of the `onTick()` method. That will cause it to only be invoked once (during script load), thus saving a repeated call.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

Post Reply