![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Wireless interface using LoRa technology
Dependencies: AlohaTransceiver RingBuffer SX1276Lib SerialInterfaceProtocol mbed L3PDU
Diff: main.cpp
- Revision:
- 20:55e222eeede1
- Parent:
- 19:6a59fb0ee921
- Child:
- 21:0f6635739f66
--- a/main.cpp Tue Aug 23 04:50:11 2016 +0000 +++ b/main.cpp Wed Aug 24 04:10:26 2016 +0000 @@ -515,7 +515,7 @@ break; } - case 0x3: // respond for service quality + case 0x3: // request for service quality { int_string_16 rssi; uint8_t snr; @@ -545,14 +545,14 @@ response.setData(2, (uint8_t) rssi.bytes[1]); // store lower bits of RSSI // generate crc - packet.generateCrc(); + response.generateCrc(); // create buffer for transmission uint8_t buffer[8]; memset(buffer, 0x0, sizeof(buffer)); // copy bytes into buffer - packet.serialize(buffer); + response.serialize(buffer); // send to aloha transceiver aloha.send(buffer, 8, src_addr);