Hi all - I'm doing one of those "worst case" projects for memory use on the prop. I'm getting a unit running that logs data from a serial instrument at ~10 Hz and writes it to an SD card. I'm checking that the received packet has the appropriate number of tabs (is at least roughly complete) and parsing it out in a packet struct that goes into a small ring buffer to prevent missed packets during SD block jumps (tested, and it does happen). I'm sitting at ~32180k sadly.
I think the main issues are in handle_state_write_data (line 108 TML.cpp), get_filename (line 240 TML.cpp), and read_new_data (line 52 ptm100.cpp). I've searched around on the forum, but didn't find a solution that appeared to help me much. Any ideas to help get this down a bit? I've got a bit of cleanup and minor implementation left to do, but it's pretty much all here now.
I switched to parsing the data out into the ptmpacket struct (ptm100.h) instead of just putting serial characters into the ring buffer to make it easier to only write full sentences, and maybe do some basic math on it in the future.
I've also attached a picture of the actual logging unit in case you're curious