Commit 580c7890 authored by hark's avatar hark

Merge branch 'master' of 185.52.224.4:yids/avr-pager

Conflicts:
	arduino-rx/Makefile
parents 564c230a 09df4daa
......@@ -6,6 +6,8 @@ include /usr/share/arduino/Arduino.mk
DEVICE_PATH = /dev/ttyUSB0
#DEVICE_PATH = /tmp/simavr-uart0
TARGET = arduino-rx
debugger: all
......
......@@ -74,14 +74,21 @@ void loop()
pl_send_message(context);
uint8_t buffer[sizeof(struct pl_pagermessage)];
memcpy(context->msg, buffer, sizeof(struct pl_pagermessage));
;
manager.setHeaderId(52);
manager.sendto(buffer ,sizeof(struct pl_pagermessage), 2);
manager.waitPacketSent();
//receive the message
context->kp = receiver;
pl_receive_message(context);
Serial.println("decrypted msg:");
Serial.println(context->msg->msg);
//free(sender);
//free(receiver);
//free(context);
delay(200);
// delay(200);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment