Add CRC to radio packets
[fw/altos] / target / radio / recv.c
index 17a3d1780358cc8125e28efa2b7f63e9efd0e4f8..1f50d8a95721ca3eb6832a6384136db183ead36a 100644 (file)
@@ -53,8 +53,10 @@ main ()
                                break;
 
                /* get excited if the packet came through correctly */
-               if (i == PACKET_LEN) {
-                       for (i = 0; i < 3; i++){
+               if (i == PACKET_LEN &&
+                   packet[PACKET_LEN+1] & PKT_APPEND_STATUS_1_CRC_OK)
+               {
+                       for (i = 0; i < 5; i++){
                                P1 = 2;
                                delay(100);
                                P1 = 0;