Skip to content

Commit

Permalink
fix: binary socket data on superb
Browse files Browse the repository at this point in the history
The bug with the ArduinoWebSockets library's code has been fixed.
See gilmaimon/ArduinoWebsockets#32
  • Loading branch information
johnmccalla committed Dec 1, 2019
1 parent 7257b53 commit e85fb50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onyx-superb/onyx-superb.ino
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void onWSMessage(WebsocketsMessage message) {
LOG3("WS message", message.isBinary(), message.length());
int length = message.length();
if (message.isBinary() && length < MAX_CMD_LENGTH) {
uint8_t* data = (uint8_t*) message.data().data();
uint8_t* data = (uint8_t*) message.c_str();
#if WANT_LOGGING == 1
LOG_NLN("M2 <-");
for (int i = 0; i < length; i++) {
Expand Down

0 comments on commit e85fb50

Please sign in to comment.