From 7c8508b65176d30212dbd4199b044c1c2a67d37c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 10 Feb 2021 14:43:50 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20an=20issue=20with=20device=20monitor=20?= =?UTF-8?q?when=20the=20=E2=80=9Csend=5Fon=5Fenter=E2=80=9D=20filter=20did?= =?UTF-8?q?n=E2=80=99t=20send=20EOL=20chars=20//=20Resolve=20#3787?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY.rst | 3 ++- platformio/commands/device/filters/send_on_enter.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 43c0d86715..7bac9c82af 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,7 @@ PlatformIO Core 5 ~~~~~~~~~~~~~~~~~~ * Fixed a "The command line is too long" issue with a linking process on Windows (`issue #3827 `_) +* Fixed an issue with `device monitor `__ when the "send_on_enter" filter didn't send EOL chars (`issue #3787 `_) 5.1.0 (2021-01-28) ~~~~~~~~~~~~~~~~~~ @@ -50,7 +51,7 @@ PlatformIO Core 5 - Improved listing of `multicast DNS services `_ - Fixed a "UnicodeDecodeError: 'utf-8' codec can't decode byte" when using J-Link for firmware uploading on Linux (`issue #3804 `_) - Fixed an issue with a compiler driver for ".ccls" language server (`issue #3808 `_) - - Fixed an issue when `pio device monitor --eol `__ and "send_on_enter" filter do not work properly (`issue #3787 `_) + - Fixed an issue when `pio device monitor --eol `__ and "send_on_enter" filter do not work properly (`issue #3787 `_) 5.0.4 (2020-12-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/device/filters/send_on_enter.py b/platformio/commands/device/filters/send_on_enter.py index 8300c98040..50b730ccbd 100644 --- a/platformio/commands/device/filters/send_on_enter.py +++ b/platformio/commands/device/filters/send_on_enter.py @@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs): def tx(self, text): self._buffer += text if self._buffer.endswith(self._eol): - text = self._buffer[: len(self._eol) * -1] + text = self._buffer self._buffer = "" return text return ""