Go Down

Topic: SDFat by Greiman - renaming happens after restart of log session  (Read 432 times) previous topic - next topic

suddenbunny

Hello everyone,

I'm developing a datalogger and I experience a couple of problems.
To start with, my code is included as attachment. (datalogger_v1).
The original code is the Lowlatency logger from SDfat from Greiman.

The logger logs CAN Data. Originally the LowLatency logger logged sensor values at a regular interval, my logger will log a CAN bus (based on incoming messages, not interval) with a max of 600-700 messages per seconds top. The logger works fine for my needs except for the following:

- Last filename is not being renamed properly (doesn't give an error when I truncate the file). So for instance, if I would start the log 3 times (filename is based on date) it will show 150300.bin 150301.bin and tmp_log.bin. Somehow renaming the file does not actually happen, but as soon you start logging new data the previous file is actually been renamed. So if I would start logging 4 times it would have 150300 150301 150302 tmp_log.bin, very strange. Hope this fuzzy explanations helps.

- Writing header file works, but is there an easier way to do this? My solution is kind of basic, I cloned the acquiredata function and insert different data (not a CAN message, but time + loggerid + ....). The cloned acquiredata function is called: Printheads.


Cheers
SB

Go Up