Skip to content

Loading…

Write mode won't log \r\n but append mode does #149

Closed
MagnusBlomberg opened this Issue · 3 comments

2 participants

@MagnusBlomberg

In Arduino v1.x the following happens (OpenLog v3.11):
Serial.println("append file.txt");
Serial.println("hello");
Serial.println("there");
endAppend(); // Three escape chars.
// This results in a two row file.

Serial.println("write file.txt 0");
Serial.println("hello");
Serial.println("there \r\n");
Serial.println("Does not show due to empty line above");
// This results in a one row file. "hellothere "
// "\r\n" and everything after these characters won't be printed to file due to an empty line.

Seems to med that append mode and write mode aren't handling \r\n in the same way.
Searched the issues but can't find anything about it.

@MagnusBlomberg

Is there any way I can help with this? Would really need linebreaks in write mode.

@nseidle
SparkFun Electronics member

I would absolutely enjoy having some help squash bugs. If you can find the area of code that is the culprit and suggest fixes we will gladly roll them into the main branch. I'm currently focused on re-writing the baud rate control so that we can free up some code words for turning off emergency reset.

@nseidle
SparkFun Electronics member

Added to v3.20. I've added support so that when you send a println to openlog when using the 'write' command, it will now record a \n\r to the text file. This should give you the functionality you're looking for. Please give it a try and re-open if you still have problems.

@nseidle nseidle closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.