@@ -906,18 +906,6 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
906906 TimerStart ( & Led3Timer );
907907
908908 const char * slotStrings [] = { "1" , "2" , "C" , "Ping-Slot" , "Multicast Ping-Slot" };
909- int32_t snr = 0 ;
910- if ( mcpsIndication -> Snr & 0x80 ) // The SNR sign bit is 1
911- {
912- // Invert and divide by 4
913- snr = ( ( ~mcpsIndication -> Snr + 1 ) & 0xFF ) >> 2 ;
914- snr = - snr ;
915- }
916- else
917- {
918- // Divide by 4
919- snr = ( mcpsIndication -> Snr & 0xFF ) >> 2 ;
920- }
921909
922910 printf ( "\r\n###### ===== DOWNLINK FRAME %lu ==== ######\r\n" , mcpsIndication -> DownLinkCounter );
923911
@@ -934,7 +922,7 @@ static void McpsIndication( McpsIndication_t *mcpsIndication )
934922 printf ( "\r\n" );
935923 printf ( "DATA RATE : DR_%d\r\n" , mcpsIndication -> RxDatarate );
936924 printf ( "RX RSSI : %d\r\n" , mcpsIndication -> Rssi );
937- printf ( "RX SNR : %ld \r\n" , snr );
925+ printf ( "RX SNR : %d \r\n" , mcpsIndication -> Snr );
938926
939927 printf ( "\r\n" );
940928}
@@ -1118,20 +1106,7 @@ static void MlmeIndication( MlmeIndication_t *mlmeIndication )
11181106 printf ( "FREQ : %lu\r\n" , mlmeIndication -> BeaconInfo .Frequency );
11191107 printf ( "DATA RATE : DR_%d\r\n" , mlmeIndication -> BeaconInfo .Datarate );
11201108 printf ( "RX RSSI : %d\r\n" , mlmeIndication -> BeaconInfo .Rssi );
1121-
1122- int32_t snr = 0 ;
1123- if ( mlmeIndication -> BeaconInfo .Snr & 0x80 ) // The SNR sign bit is 1
1124- {
1125- // Invert and divide by 4
1126- snr = ( ( ~mlmeIndication -> BeaconInfo .Snr + 1 ) & 0xFF ) >> 2 ;
1127- snr = - snr ;
1128- }
1129- else
1130- {
1131- // Divide by 4
1132- snr = ( mlmeIndication -> BeaconInfo .Snr & 0xFF ) >> 2 ;
1133- }
1134- printf ( "RX SNR : %ld\r\n" , snr );
1109+ printf ( "RX SNR : %d\r\n" , mlmeIndication -> BeaconInfo .Snr );
11351110 printf ( "\r\n" );
11361111 }
11371112 else
0 commit comments