![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Wireless interface using LoRa technology
Dependencies: AlohaTransceiver RingBuffer SX1276Lib_inAir SerialInterfaceProtocol mbed L3PDU
Diff: main.cpp
- Revision:
- 17:7093a533b4ae
- Parent:
- 16:dcc5f9075595
- Child:
- 18:ce8dc94163d8
--- a/main.cpp Tue Aug 23 04:50:45 2016 +0000 +++ b/main.cpp Wed Aug 24 04:09:42 2016 +0000 @@ -526,7 +526,7 @@ break; } - case 0x3: // respond for service quality + case 0x3: // request for service quality { int_string_16 rssi; uint8_t snr; @@ -556,14 +556,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);