alan broad
/
carbon_v5_arm_studio
arm studio build
Diff: src/main.cpp
- Revision:
- 20:62a1a264fa1e
- Parent:
- 19:cff66b2c15b5
- Child:
- 21:60e5b6becdb0
diff -r cff66b2c15b5 -r 62a1a264fa1e src/main.cpp --- a/src/main.cpp Mon Feb 04 19:23:58 2019 +0000 +++ b/src/main.cpp Sat Apr 27 15:27:48 2019 +0000 @@ -323,8 +323,10 @@ pAck->joinAttempts = 0; //no attempts made yet to join pAck->bAck = 0; //won't know if we receive a lorawan ack until after xmit pAck->bAckdata = 0; //won't know if we receive a lorawan ack downstream data until after xmit - pAck->rssi = 0; //if not rx1/rx2 then no RSSI value + pAck->rssi = 0; //if not rx1/rx2 then no RSSI value -- 8 bit rssi, deprecated, keep for compatbility + pAck->rssi2 = 0; //16 bit rssi pAck->snr = 0; //if not rx1/rx2 then no SNR value + pAck->snr2 = 0; //16 bit snr if(!joined) { //if not previously joined, then need to join now pAck->bJoined = 0; if(verbose)pc.printf("\r\n----------- NETWORK NOT JOINED YET, WILL TRY TO JOIN %d TIMES\r\n",pUp->joinAttemps); @@ -355,9 +357,11 @@ acks_rcvd++; pAck->bAck = 1; //we got a Rx1 or Rx2 ack mDot::rssi_stats rssiStats = dot->getRssiStats(); //rssi stat - pAck->rssi = (int8_t)rssiStats.last; + pAck->rssi = (int8_t)rssiStats.last; //deprecated later! + pAck->rssi2 = (int16_t)rssiStats.last; mDot::snr_stats snrStats = dot->getSnrStats(); //snr stat - pAck->snr = (int8_t)snrStats.last; + pAck->snr = (int8_t)snrStats.last; //deprecate later + pAck->snr2 = (int16_t)snrStats.last; if (verbose)printf("\n\rdata->send()=true; ack:%d, rssi:%d snr:%d\r\n",pAck->bAck,pAck->rssi,pAck->snr); if (events.is_packet_received()){ //downstream data from the Rx1/Rx2 pkt? if (verbose)printf("\n\revents.is_packet_received = true\r\n");