For getting RSSI value from xbee
Dependents: XBeeGetRSSISampleProgram Xbee_s2_RX_versao2
Diff: XBeeGetRssi.cpp
- Revision:
- 13:e2fd29cb22d7
- Parent:
- 12:7ec2a4147b44
--- a/XBeeGetRssi.cpp Tue Sep 03 07:04:26 2013 +0000 +++ b/XBeeGetRssi.cpp Tue Sep 03 10:50:40 2013 +0000 @@ -134,6 +134,9 @@ case 'F': _rssi_value+=(int)(*_returned_rssi-0x31)*16; break; + default: + _rssi_value+=0; + break; } switch(*(_returned_rssi+1)){ case '0': @@ -184,6 +187,9 @@ case 'F': _rssi_value+=(int)(*(_returned_rssi+1)-0x31); break; + default: + _rssi_value+=0; + break; } return -1*_rssi_value;