Skip to content

Commit

Permalink
cores/epoxy/Print.cpp: Change println() to print just \n instead of \r\n
Browse files Browse the repository at this point in the history
  • Loading branch information
bxparks committed Dec 5, 2021
1 parent d5ad743 commit 432e304
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Unreleased
* Add optional `DEPS` variable containing header files that the `*.ino`
depends on.
* Change `Print::println()` to print just a `\n` instead of `\r\n`, which
is more compatible on Unix where the line terminator is a single `\n`.
* 1.0 (2021-09-30)
* Add `epoxy_argc` and `epoxy_argv` as extern global variables which
are set to the `argc` and `argv` parameters passed into the global
Expand Down
2 changes: 1 addition & 1 deletion cores/epoxy/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ size_t Print::print(const Printable& x)

size_t Print::println(void)
{
return write("\r\n");
return write('\n');
}

size_t Print::println(const String &s)
Expand Down

1 comment on commit 432e304

@brucemack
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Brian, thanks for an awesome library! Your release notes make it clear that this is a breaking change, so no surprise here. But it's pretty unfortunate because it makes the behavior of the library explicitly different from the Arduino core (https://github.com/arduino/ArduinoCore-avr/blob/master/cores/arduino/Print.cpp#L126). I'm not completely clear what you were trying to address, but I'm wondering if it would be better to modify StdioSerial to achieve the desired behavior on the output side?

Is the issue possibly related to the peculiarities of the serial monitor in the Arduino IDE? If you can provide a bit more background on what are trying to address I will try to propose an alternate PR.

Many Thanks!!!

Please sign in to comment.