RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
SD logging issue
Author Message
Reply with quote
Post SD logging issue 
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?

View user's profile Send private message
Reply with quote
Post  
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.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
I'm using LUA scripting to automatically start logging. Attached is the RCP config and a sample log file.




RC_38.LOG.txt
 Description:

Download
 Filename:  RC_38.LOG.txt
 Filesize:  205.31 KB
 Downloaded:  37 Time(s)


config.rcp.txt
 Description:

Download
 Filename:  config.rcp.txt
 Filesize:  18.86 KB
 Downloaded:  42 Time(s)

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

[quote=torkey]I'm using LUA scripting to automatically start logging. Attached is the RCP config and a sample log file.[/quote]

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.

Quote:
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.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
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.




RC_42.LOG.txt
 Description:

Download
 Filename:  RC_42.LOG.txt
 Filesize:  242.41 KB
 Downloaded:  40 Time(s)

View user's profile Send private message
Reply with quote
Post  
Quote:
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.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
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

View user's profile Send private message
Reply with quote
Post  
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.
View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
I just did the upgrade and will be doing a test later.

What is the optimal way to start logging?

View user's profile Send private message
Reply with quote
Post  
Quote:
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.
View user's profile Send private message Send e-mail Visit poster's website
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 can download files in this forum