diff --git a/esp-receiver/platformio.ini b/esp-receiver/platformio.ini index 8a6fd70..75045dc 100644 --- a/esp-receiver/platformio.ini +++ b/esp-receiver/platformio.ini @@ -19,5 +19,5 @@ lib_deps = knolleary/PubSubClient@^2.8 bblanchon/ArduinoJson@^6.17.3 build_flags = -D USE_ESPRESSIF -upload_port = /dev/ttyUSB0 +;upload_port = /dev/ttyUSB0 diff --git a/esp-receiver/src/main.cpp b/esp-receiver/src/main.cpp index e6e35c1..5741e43 100644 --- a/esp-receiver/src/main.cpp +++ b/esp-receiver/src/main.cpp @@ -145,7 +145,7 @@ void loop() uint8_t device_id = rh_buf[0] &0x0f; Serial.print("Device ID: "); Serial.println(device_id); - switch (rh_buf[0] & 0xf0) + switch (header) { case MSG_START: // start message