Remove duplicate code
This commit is contained in:
parent
49f120b656
commit
c842e1a1e7
1 changed files with 2 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
#include <StreamCommunicator.h>
|
#include <StreamCommunicator.h>
|
||||||
|
|
||||||
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)];
|
char message[calculateMessageOutSize(numberOfValues)];
|
||||||
parseIDs(values, numberOfValues, message);
|
parseIDs(values, numberOfValues, message);
|
||||||
stream.println(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamCommunicator::sendMessage(const char message[])
|
void StreamCommunicator::sendMessage(const char message[])
|
||||||
|
@ -25,6 +25,3 @@ char *StreamCommunicator::receiveMessage()
|
||||||
}
|
}
|
||||||
return getBuffer();
|
return getBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue