Browse Source

Still debug trash but commented out, deal wid it.

Read Error 10 years ago
parent
commit
f4e627ff22
1 changed files with 13 additions and 13 deletions
  1. 13
    13
      frsky_arduino_rx_complete.ino

+ 13
- 13
frsky_arduino_rx_complete.ino View File

12
 #include <avr/interrupt.h>
12
 #include <avr/interrupt.h>
13
 #include <EEPROM.h>
13
 #include <EEPROM.h>
14
 #include "iface_cc2500.h"
14
 #include "iface_cc2500.h"
15
-#define DEBUG
16
-#define DEBUG0
17
-#define DEBUG1
18
-#define DEBUG2
19
-#define DEBUG3
20
-#define DEBUG4
21
-#define DEBUG5
22
-#define FAILSAFE
15
+//#define DEBUG
16
+//#define DEBUG0
17
+//#define DEBUG1
18
+//#define DEBUG2
19
+//#define DEBUG3
20
+//#define DEBUG4
21
+//#define DEBUG5
22
+//#define FAILSAFE
23
 #define SPIBB
23
 #define SPIBB
24
 //#define SPIHW
24
 //#define SPIHW
25
 #if defined SPIHW
25
 #if defined SPIHW
382
                     cc2500_readFifo((uint8_t *)ccData, ccLen);
382
                     cc2500_readFifo((uint8_t *)ccData, ccLen);
383
                     if (ccData[ccLen - 1] & 0x80) {
383
                     if (ccData[ccLen - 1] & 0x80) {
384
                         if (ccData[2] == 0x01) {
384
                         if (ccData[2] == 0x01) {
385
-                          if(debug2) {
386
-                            //Serial.print(" ccData[2] = ");
387
-                            //Serial.println(ccData[2]);
385
+                          if(debug3) {
386
+                            Serial.print("ccLen = ");
387
+                            Serial.println(ccLen);
388
                           }
388
                           }
389
                             if ((ccData[3] == txid[0]) && (ccData[4] == txid[1])) {
389
                             if ((ccData[3] == txid[0]) && (ccData[4] == txid[1])) {
390
                               if(debug3) 
390
                               if(debug3) 
396
                               }
396
                               }
397
                                 if (ccData[5] == bindIdx) {
397
                                 if (ccData[5] == bindIdx) {
398
                                     for (uint8_t n = 0; n < 5; n++) {
398
                                     for (uint8_t n = 0; n < 5; n++) {
399
-                                      if(debug2) 
399
+                                      if(debug3) 
400
                                       {
400
                                       {
401
                                         Serial.print("ccData[6 + n] = ");
401
                                         Serial.print("ccData[6 + n] = ");
402
                                         Serial.println(ccData[6 + n]);
402
                                         Serial.println(ccData[6 + n]);
404
                                         Serial.println(ccData[ccLen - 3]);                      
404
                                         Serial.println(ccData[ccLen - 3]);                      
405
                                       }
405
                                       }
406
                                         //if (ccData[6 + n] == ccData[ccLen - 3]) {
406
                                         //if (ccData[6 + n] == ccData[ccLen - 3]) {
407
-                                          if (ccData[6 + n] == 3) {
407
+                                          if (ccData[6 + n] <= 3) {
408
                                             eol = true;
408
                                             eol = true;
409
                                             #if defined(DEBUG)
409
                                             #if defined(DEBUG)
410
                                                 Serial.print("listLength: ");
410
                                                 Serial.print("listLength: ");

Loading…
Cancel
Save