osc bug fix
This commit is contained in:
parent
7fc7eb2719
commit
3bf8314f2e
2 changed files with 9 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue