Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions WebSocketClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROGMEM const char *WebSocketClientStringTable[] =

String WebSocketClient::getStringTableItem(int index) {
char buffer[35];
strcpy_P(buffer, (char*)pgm_read_word(&(WebSocketClientStringTable[index])));
strcpy_P(buffer, (char*)pgm_read_ptr(&(WebSocketClientStringTable[index])));
return String(buffer);
}

Expand All @@ -73,7 +73,7 @@ void WebSocketClient::disconnect() {
}

void WebSocketClient::monitor () {
char character;
int character;

if (_client.available() > 0 && (character = _client.read()) == 0) {
String data = "";
Expand All @@ -83,7 +83,7 @@ void WebSocketClient::monitor () {
endReached = character == -1;

if (!endReached) {
data += character;
data += (char)character;
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/EchoExample/EchoExample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ void loop() {
}

void dataArrived(WebSocketClient client, String data) {
Serial.println("Data Arrived: " + data);
Serial.println(String("Data Arrived: ") + data);
}