diff --git a/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp b/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp index 7823810..705c0b9 100644 --- a/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp +++ b/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.cpp @@ -13,7 +13,7 @@ void StreamCommunicator::sendMessage(int *values, __SIZE_TYPE__ numberOfValues) stream.println(message); } -void StreamCommunicator::sendMessage(char *message) +void StreamCommunicator::sendMessage(const char message[]) { stream.println(message); } @@ -33,7 +33,7 @@ __SIZE_TYPE__ StreamCommunicator::calculateMessageOutSize(__SIZE_TYPE__ numberOf return numberOfValues + (numberOfValues - 1) + 1; } -void StreamCommunicator::parseIDs(int *values, __SIZE_TYPE__ numberOfValues, char *output) +void StreamCommunicator::parseIDs(const int values[], __SIZE_TYPE__ numberOfValues, char *output) { __SIZE_TYPE__ outputSize = calculateMessageOutSize(numberOfValues); __SIZE_TYPE__ outputCharPointer = 0; diff --git a/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.h b/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.h index b189a3c..619a613 100644 --- a/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.h +++ b/Devices/Control/Firmware/lib/StreamCommunicator/StreamCommunicator.h @@ -7,12 +7,12 @@ protected: char *messageBuffer; __SIZE_TYPE__ bufferSize; __SIZE_TYPE__ calculateMessageOutSize(__SIZE_TYPE__ numberOfValues); - void parseIDs(int *values, __SIZE_TYPE__ numberOfValues, char *out); + void parseIDs(const int values[], __SIZE_TYPE__ numberOfValues, char *out); public: StreamCommunicator(Stream &s_out, __SIZE_TYPE__ bufferSize); void sendMessage(int *values, __SIZE_TYPE__ numberOfValues); - void sendMessage(char *message); + void sendMessage(const char message[]); char *receiveMessage(); char *getBuffer(); int getBufferSize();