diff options
Diffstat (limited to 'serial-pjon')
-rw-r--r-- | serial-pjon/Makefile | 2 | ||||
-rw-r--r-- | serial-pjon/serial-pjon.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/serial-pjon/Makefile b/serial-pjon/Makefile index e1d44a2..be3dd35 100644 --- a/serial-pjon/Makefile +++ b/serial-pjon/Makefile @@ -28,7 +28,7 @@ CXX_LIBS := arduino-stub EXTERNAL_LIBS := pjon SPREADAVR_PATH := .. -PJON_PATH := $(SPREADAVR_PATH)/contrib/PJON +PJON_PATH := $(SPREADAVR_PATH)/contrib/PJON-3.0 PJON_OPTS := include $(SPREADAVR_PATH)/include.mk diff --git a/serial-pjon/serial-pjon.cpp b/serial-pjon/serial-pjon.cpp index 48b1cf3..7c3a116 100644 --- a/serial-pjon/serial-pjon.cpp +++ b/serial-pjon/serial-pjon.cpp @@ -55,13 +55,13 @@ void error_handler(uint8_t code, uint8_t data) { } } -void recv_handler(uint8_t length, uint8_t *payload) { +void recv_handler(uint8_t id, uint8_t *payload, uint8_t length) { if(length == 0) { - printf("got 0 byte message...\r\n"); + printf("got 0 byte message from %d...\r\n", id); return; } led_on(); - printf("got message(%d bytes): '", length); + printf("got message(%d bytes) from %d: '", length, id); for(uint16_t i = 0; i < length; ++i) putchar(payload[i]); printf("'\r\n"); |