Debug Serial para programa resetar o buffer quando houver tamanhos errados na mensagem
Dependencies: pulga-lorawan-drv PingPong-P2P-ClickButtonToWork-SX1272
Diff: main.cpp
- Revision:
- 8:856f7a8cc20c
- Parent:
- 7:37dc9ce68914
- Child:
- 9:cf555a570349
--- a/main.cpp Fri Mar 19 20:26:32 2021 +0000 +++ b/main.cpp Wed Mar 24 20:14:32 2021 +0000 @@ -29,6 +29,7 @@ pc.attach(NULL, RawSerial::RxIrq); //enqueue the serial rx reception as a normal task queue.call(SerialRx); + //queue.event(&SerialRx); return; } @@ -44,13 +45,14 @@ pc.baud(9600); pc.printf("config9600\n"); //enable serial rx interrupt - pc.attach(&serial_post_to_queue, RawSerial::RxIrq); + //pc.attach(&serial_post_to_queue, RawSerial::RxIrq); //____Configuration Lora Thread eventThread; eventThread.start(callback(&queue, &EventQueue::dispatch_forever)); dio0.rise(queue.event(&print_packet)); //configure interrupt rotine ro recieve packet + pc.attach(&SerialRx, RawSerial::RxIrq); setup(); //configura sx1272 @@ -64,7 +66,7 @@ if (!button1){ - printf("SENDING PING\n"); + pc.printf("SENDING PING\n"); send_data(PING); }