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

Closed
MagnusBlomberg opened this Issue Mar 27, 2013 · 3 comments

Comments

Projects
None yet
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

This comment has been minimized.

Show comment
Hide comment
@MagnusBlomberg

MagnusBlomberg Apr 2, 2013

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

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

@nseidle

This comment has been minimized.

Show comment
Hide comment
@nseidle

nseidle Apr 2, 2013

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.

Member

nseidle commented Apr 2, 2013

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 added a commit that referenced this issue Apr 8, 2013

@nseidle

This comment has been minimized.

Show comment
Hide comment
@nseidle

nseidle Apr 8, 2013

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.

Member

nseidle commented Apr 8, 2013

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 Apr 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment