diff --git a/osc/src/main.cpp b/osc/src/main.cpp index cc469de..76cbd32 100644 --- a/osc/src/main.cpp +++ b/osc/src/main.cpp @@ -109,7 +109,9 @@ void loop() { // if (type == '{') { //expecting a Hello message. - if (POSTMAN_SERIAL.available() > sizeof(Hello) + 1) { + if (POSTMAN_SERIAL.available() > sizeof(Hello) + 2) { + POSTMAN_SERIAL.read(); + // Hello hello; POSTMAN_SERIAL.readBytes((uint8_t *) &hello, sizeof(Hello)); char last = POSTMAN_SERIAL.read(); @@ -134,7 +136,9 @@ void loop() { } } else if (type == '[') { //expecting a Note message. - if (POSTMAN_SERIAL.available() > sizeof(Note) + 1) { + if (POSTMAN_SERIAL.available() > sizeof(Note) + 2) { + POSTMAN_SERIAL.read(); + // Note note; POSTMAN_SERIAL.readBytes((uint8_t *) ¬e, sizeof(Note)); char last = POSTMAN_SERIAL.read(); diff --git a/postman/src/main.cpp b/postman/src/main.cpp index 543ea53..83adee5 100644 --- a/postman/src/main.cpp +++ b/postman/src/main.cpp @@ -112,6 +112,9 @@ void onDataSent(uint8_t *mac_addr, uint8_t sendStatus) { // on 'receive' void onDataReceive(uint8_t * mac, uint8_t *incomingData, uint8_t len) { + // + //MONITORING_SERIAL.write(incomingData, len); + // #if defined(HAVE_CLIENT) Serial.write(incomingData, len); // we pass it over to the client.