Merge ccdbg and altos sources into one giant repository
[fw/altos] / target / radio / recv.c
index 17a3d1780358cc8125e28efa2b7f63e9efd0e4f8..c50c32055e35b164756d570da52f69d86fdecf72 100644 (file)
@@ -46,15 +46,17 @@ main ()
                        packet[i] = RFD;
                }
                P1 = 0;
-               
+
                /* check packet contents */
                for (i = 0; i < PACKET_LEN; i++)
                        if (packet[i] != i)
                                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;