From c842e1a1e7d73ee6747dced6f3287df46faf4d5d Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sun, 10 Apr 2022 16:20:26 +0200 Subject: [PATCH] Remove duplicate code --- Firmware/lib/StreamCommunicator/StreamCommunicator.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp b/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp index 26e387e..d0e7dcc 100644 --- a/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp +++ b/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp @@ -1,6 +1,6 @@ #include -StreamCommunicator::StreamCommunicator(Stream &s_out, __SIZE_TYPE__ bufferSize) :Communicator(bufferSize), stream(s_out) +StreamCommunicator::StreamCommunicator(Stream &s_out, __SIZE_TYPE__ bufferSize) : Communicator(bufferSize), stream(s_out) { } @@ -8,7 +8,7 @@ void StreamCommunicator::sendMessage(int *values, __SIZE_TYPE__ numberOfValues) { char message[calculateMessageOutSize(numberOfValues)]; parseIDs(values, numberOfValues, message); - stream.println(message); + sendMessage(message); } void StreamCommunicator::sendMessage(const char message[]) @@ -25,6 +25,3 @@ char *StreamCommunicator::receiveMessage() } return getBuffer(); } - - -