|
@@ -4,20 +4,20 @@
|
4
|
4
|
|
5
|
5
|
#ifdef DEBUG
|
6
|
6
|
|
7
|
|
-#define DEBUG_TEST_PART_VERSION
|
8
|
|
-#define DEBUG_EEPROM_DATA_READ
|
9
|
|
-#define DEBUG_EEPROM_DATA_WRITE
|
10
|
|
-#define DEBUG_MISSING_PACKETS
|
11
|
|
-#define DEBUG_PACKET_DUMP
|
12
|
|
-#define DEBUG_PACKET_DUMP_TUNE
|
13
|
|
-#define DEBUG_PACKET_DUMP_BIND
|
14
|
|
-#define DEBUG_PACKET_DUMP_LIST
|
15
|
|
-#define DEBUG_PPM_VALUES
|
16
|
|
-#define DEBUG_ERROR_MESSAGES
|
17
|
|
-#define DEBUG_MESSAGES
|
18
|
|
-#define DEBUG_HOP_DATA
|
19
|
|
-
|
20
|
|
-//#define DEBUG_SINGLE_CHARACTER_MESSAGES
|
|
7
|
+//#define DEBUG_TEST_PART_VERSION
|
|
8
|
+//#define DEBUG_EEPROM_DATA_READ
|
|
9
|
+//#define DEBUG_EEPROM_DATA_WRITE
|
|
10
|
+//#define DEBUG_MISSING_PACKETS
|
|
11
|
+//#define DEBUG_PACKET_DUMP
|
|
12
|
+//#define DEBUG_PACKET_DUMP_TUNE
|
|
13
|
+//#define DEBUG_PACKET_DUMP_BIND
|
|
14
|
+//#define DEBUG_PACKET_DUMP_LIST
|
|
15
|
+//#define DEBUG_PPM_VALUES
|
|
16
|
+//#define DEBUG_ERROR_MESSAGES
|
|
17
|
+//#define DEBUG_MESSAGES
|
|
18
|
+//#define DEBUG_HOP_DATA
|
|
19
|
+
|
|
20
|
+#define DEBUG_SINGLE_CHARACTER_MESSAGES
|
21
|
21
|
|
22
|
22
|
#define ALWAYS_PERFORM_BINDING
|
23
|
23
|
#define DISABLE_REAL_EEPROM_WRITE
|
|
@@ -291,6 +291,7 @@ static void tuning() {
|
291
|
291
|
|
292
|
292
|
}
|
293
|
293
|
|
|
294
|
+ // TODO use timer here?
|
294
|
295
|
if (frequencyOffsetTimer > 3000) {
|
295
|
296
|
frequencyOffsetTimer = 0;
|
296
|
297
|
//cc2500WriteReg(CC2500_0C_FSCTRL0, frequencyOffsetHack);
|
|
@@ -509,6 +510,11 @@ static void performBind(void) {
|
509
|
510
|
debugWrite("\n");
|
510
|
511
|
#endif
|
511
|
512
|
}
|
|
513
|
+#ifdef DEBUG_SINGLE_CHARACTER_MESSAGES
|
|
514
|
+ debugChar('l');
|
|
515
|
+#endif
|
|
516
|
+ break;
|
|
517
|
+ } else {
|
512
|
518
|
#ifdef DEBUG_ERROR_MESSAGES
|
513
|
519
|
if (!(ccData[ccLen - 1] & CC2500_LQI_CRC_OK_BM)) {
|
514
|
520
|
debugWrite("RX: List: invalid CRC!\n");
|
|
@@ -543,11 +549,6 @@ static void performBind(void) {
|
543
|
549
|
}
|
544
|
550
|
#endif
|
545
|
551
|
#ifdef DEBUG_SINGLE_CHARACTER_MESSAGES
|
546
|
|
- debugChar('l');
|
547
|
|
-#endif
|
548
|
|
- break;
|
549
|
|
- } else {
|
550
|
|
-#ifdef DEBUG_SINGLE_CHARACTER_MESSAGES
|
551
|
552
|
debugChar('m');
|
552
|
553
|
#endif
|
553
|
554
|
}
|
|
@@ -873,7 +874,7 @@ void rxReceivePacket() {
|
873
|
874
|
|
874
|
875
|
#ifdef DEBUG_PPM_VALUES
|
875
|
876
|
debugWrite("RX: got packet @ ");
|
876
|
|
- debugUnsigned64(timerGet() / 1000);
|
|
877
|
+ debugUnsigned64(timerGet() / 1000000);
|
877
|
878
|
debugWrite("s:\n");
|
878
|
879
|
for (uint8_t i = 0; i < CHANNELS; i++) {
|
879
|
880
|
debugUnsigned8(i);
|