@@ -74,7 +74,7 @@ int MATCH_SPACE(int measured_ticks, int desired_us) {return MATCH(measured_ticks
74
74
// Debugging versions are in IRremote.cpp
75
75
#endif
76
76
77
- #ifdef NEC
77
+ #ifdef SEND_NEC
78
78
void IRsend::sendNEC (unsigned long data, int nbits)
79
79
{
80
80
enableIROut (38 );
@@ -96,7 +96,7 @@ void IRsend::sendNEC(unsigned long data, int nbits)
96
96
}
97
97
#endif
98
98
99
- #ifdef WHYNTER
99
+ #ifdef SEND_WHYNTER
100
100
void IRsend::sendWhynter (unsigned long data, int nbits) {
101
101
enableIROut (38 );
102
102
mark (WHYNTER_ZERO_MARK);
@@ -119,7 +119,7 @@ void IRsend::sendWhynter(unsigned long data, int nbits) {
119
119
}
120
120
#endif
121
121
122
- #ifdef SONY
122
+ #ifdef SEND_SONY
123
123
void IRsend::sendSony (unsigned long data, int nbits) {
124
124
enableIROut (40 );
125
125
mark (SONY_HDR_MARK);
@@ -153,6 +153,7 @@ void IRsend::sendRaw(unsigned int buf[], int len, int hz)
153
153
space (0 ); // Just to be sure
154
154
}
155
155
156
+ #ifdef SEND_RC5
156
157
// Note: first bit must be a one (start bit)
157
158
void IRsend::sendRC5 (unsigned long data, int nbits)
158
159
{
@@ -174,7 +175,9 @@ void IRsend::sendRC5(unsigned long data, int nbits)
174
175
}
175
176
space (0 ); // Turn off at end
176
177
}
178
+ #endif
177
179
180
+ #ifdef SEND_RC6
178
181
// Caller needs to take care of flipping the toggle bit
179
182
void IRsend::sendRC6 (unsigned long data, int nbits)
180
183
{
@@ -206,8 +209,9 @@ void IRsend::sendRC6(unsigned long data, int nbits)
206
209
}
207
210
space (0 ); // Turn off at end
208
211
}
212
+ #endif
209
213
210
- #ifdef PANASONIC
214
+ #ifdef SEND_PANASONIC
211
215
void IRsend::sendPanasonic (unsigned int address, unsigned long data) {
212
216
enableIROut (35 );
213
217
mark (PANASONIC_HDR_MARK);
@@ -237,7 +241,7 @@ void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
237
241
}
238
242
#endif
239
243
240
- #ifdef JVC
244
+ #ifdef SEND_JVC
241
245
void IRsend::sendJVC (unsigned long data, int nbits, int repeat)
242
246
{
243
247
enableIROut (38 );
@@ -262,7 +266,7 @@ void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
262
266
}
263
267
#endif
264
268
265
- #ifdef SAMSUNG
269
+ #ifdef SEND_SAMSUNG
266
270
void IRsend::sendSAMSUNG (unsigned long data, int nbits)
267
271
{
268
272
enableIROut (38 );
@@ -454,7 +458,7 @@ int IRrecv::decode(decode_results *results) {
454
458
if (irparams.rcvstate != STATE_STOP) {
455
459
return ERR;
456
460
}
457
- #ifdef NEC
461
+ #ifdef DECODE_NEC
458
462
#ifdef DEBUG
459
463
Serial.println (" Attempting NEC decode" );
460
464
#endif
@@ -463,7 +467,7 @@ int IRrecv::decode(decode_results *results) {
463
467
}
464
468
#endif
465
469
466
- #ifdef SONY
470
+ #ifdef DECODE_SONY
467
471
#ifdef DEBUG
468
472
Serial.println (" Attempting Sony decode" );
469
473
#endif
@@ -472,7 +476,7 @@ int IRrecv::decode(decode_results *results) {
472
476
}
473
477
#endif
474
478
475
- #ifdef SANYO
479
+ #ifdef DECODE_SANYO
476
480
#ifdef DEBUG
477
481
Serial.println (" Attempting Sanyo decode" );
478
482
#endif
@@ -481,7 +485,7 @@ int IRrecv::decode(decode_results *results) {
481
485
}
482
486
#endif
483
487
484
- #ifdef MITSUBISHI
488
+ #ifdef DECODE_MITSUBISHI
485
489
#ifdef DEBUG
486
490
Serial.println (" Attempting Mitsubishi decode" );
487
491
#endif
@@ -490,7 +494,7 @@ int IRrecv::decode(decode_results *results) {
490
494
}
491
495
#endif
492
496
493
- #ifdef RC5
497
+ #ifdef DECODE_RC5
494
498
#ifdef DEBUG
495
499
Serial.println (" Attempting RC5 decode" );
496
500
#endif
@@ -499,7 +503,7 @@ int IRrecv::decode(decode_results *results) {
499
503
}
500
504
#endif
501
505
502
- #ifdef RC6
506
+ #ifdef DECODE_RC6
503
507
#ifdef DEBUG
504
508
Serial.println (" Attempting RC6 decode" );
505
509
#endif
@@ -508,7 +512,7 @@ int IRrecv::decode(decode_results *results) {
508
512
}
509
513
#endif
510
514
511
- #ifdef PANASONIC
515
+ #ifdef DECODE_PANASONIC
512
516
#ifdef DEBUG
513
517
Serial.println (" Attempting Panasonic decode" );
514
518
#endif
@@ -517,13 +521,16 @@ int IRrecv::decode(decode_results *results) {
517
521
}
518
522
#endif
519
523
520
- #ifdef JVC
524
+ #ifdef DECODE_LG
521
525
#ifdef DEBUG
522
526
Serial.println (" Attempting LG decode" );
523
527
#endif
524
528
if (decodeLG (results)) {
525
529
return DECODED;
526
530
}
531
+ #endif
532
+
533
+ #ifdef DECODE_JVC
527
534
#ifdef DEBUG
528
535
Serial.println (" Attempting JVC decode" );
529
536
#endif
@@ -532,20 +539,24 @@ int IRrecv::decode(decode_results *results) {
532
539
}
533
540
#endif
534
541
535
- #ifdef SAMSUNG
542
+ #ifdef DECODE_SAMSUNG
536
543
#ifdef DEBUG
537
544
Serial.println (" Attempting SAMSUNG decode" );
538
545
#endif
539
546
if (decodeSAMSUNG (results)) {
540
547
return DECODED;
541
548
}
549
+ #endif
550
+
551
+ #ifdef DECODE_WHYNTER
542
552
#ifdef DEBUG
543
553
Serial.println (" Attempting Whynter decode" );
544
554
#endif
545
555
if (decodeWhynter (results)) {
546
556
return DECODED;
547
557
}
548
- // Aiwa RC-T501
558
+ #endif
559
+
549
560
#ifdef AIWA_RC_T501
550
561
#ifdef DEBUG
551
562
Serial.println (" Attempting Aiwa RC-T501 decode" );
@@ -566,7 +577,7 @@ int IRrecv::decode(decode_results *results) {
566
577
return ERR;
567
578
}
568
579
569
- #ifdef NEC
580
+ #ifdef DECODE_NEC
570
581
// NECs have a repeat only 4 items long
571
582
long IRrecv::decodeNEC (decode_results *results) {
572
583
long data = 0 ;
@@ -617,7 +628,7 @@ long IRrecv::decodeNEC(decode_results *results) {
617
628
}
618
629
#endif
619
630
620
- #ifdef SONY
631
+ #ifdef DECODE_SONY
621
632
long IRrecv::decodeSony (decode_results *results) {
622
633
long data = 0 ;
623
634
if (irparams.rawlen < 2 * SONY_BITS + 2 ) {
@@ -631,7 +642,7 @@ long IRrecv::decodeSony(decode_results *results) {
631
642
// Serial.print("IR Gap found: ");
632
643
results->bits = 0 ;
633
644
results->value = REPEAT;
634
- #ifdef SANYO
645
+ #ifdef DECODE_SANYO
635
646
results->decode_type = SANYO;
636
647
#else
637
648
results->decode_type = UNKNOWN;
@@ -675,6 +686,7 @@ long IRrecv::decodeSony(decode_results *results) {
675
686
}
676
687
#endif
677
688
689
+ #ifdef DECODE_WHYNTER
678
690
long IRrecv::decodeWhynter (decode_results *results) {
679
691
long data = 0 ;
680
692
@@ -732,9 +744,9 @@ long IRrecv::decodeWhynter(decode_results *results) {
732
744
results->decode_type = WHYNTER;
733
745
return DECODED;
734
746
}
747
+ #endif
735
748
736
-
737
- #ifdef SANYO
749
+ #ifdef DECODE_SANYO
738
750
// I think this is a Sanyo decoder - serial = SA 8650B
739
751
// Looks like Sony except for timings, 48 chars of data and time/space different
740
752
long IRrecv::decodeSanyo (decode_results *results) {
@@ -800,7 +812,7 @@ long IRrecv::decodeSanyo(decode_results *results) {
800
812
}
801
813
#endif
802
814
803
- #ifdef MITSUBISHI
815
+ #ifdef DECODE_MITSUBISHI
804
816
// Looks like Sony except for timings, 48 chars of data and time/space different
805
817
long IRrecv::decodeMitsubishi (decode_results *results) {
806
818
// Serial.print("?!? decoding Mitsubishi:");Serial.print(irparams.rawlen); Serial.print(" want "); Serial.println( 2 * MITSUBISHI_BITS + 2);
@@ -911,8 +923,8 @@ int IRrecv::getRClevel(decode_results *results, int *offset, int *used, int t1)
911
923
#endif
912
924
return val;
913
925
}
914
- #endif
915
926
927
+ #ifdef DECODE_RC5
916
928
long IRrecv::decodeRC5 (decode_results *results) {
917
929
if (irparams.rawlen < MIN_RC5_SAMPLES + 2 ) {
918
930
return ERR;
@@ -947,7 +959,9 @@ long IRrecv::decodeRC5(decode_results *results) {
947
959
results->decode_type = RC5;
948
960
return DECODED;
949
961
}
962
+ #endif
950
963
964
+ #ifdef DECODE_RC6
951
965
long IRrecv::decodeRC6 (decode_results *results) {
952
966
if (results->rawlen < MIN_RC6_SAMPLES) {
953
967
return ERR;
@@ -998,8 +1012,9 @@ long IRrecv::decodeRC6(decode_results *results) {
998
1012
results->decode_type = RC6;
999
1013
return DECODED;
1000
1014
}
1015
+ #endif
1001
1016
1002
- #ifdef PANASONIC
1017
+ #ifdef DECODE_PANASONIC
1003
1018
long IRrecv::decodePanasonic (decode_results *results) {
1004
1019
unsigned long long data = 0 ;
1005
1020
int offset = 1 ;
@@ -1035,7 +1050,7 @@ long IRrecv::decodePanasonic(decode_results *results) {
1035
1050
}
1036
1051
#endif
1037
1052
1038
- #ifdef LG
1053
+ #ifdef DECODE_LG
1039
1054
long IRrecv::decodeLG (decode_results *results) {
1040
1055
long data = 0 ;
1041
1056
int offset = 1 ; // Skip first space
@@ -1083,7 +1098,7 @@ long IRrecv::decodeLG(decode_results *results) {
1083
1098
1084
1099
#endif
1085
1100
1086
- #ifdef JVC
1101
+ #ifdef DECODE_JVC
1087
1102
long IRrecv::decodeJVC (decode_results *results) {
1088
1103
long data = 0 ;
1089
1104
int offset = 1 ; // Skip first space
@@ -1137,7 +1152,7 @@ long IRrecv::decodeJVC(decode_results *results) {
1137
1152
}
1138
1153
#endif
1139
1154
1140
- #ifdef SAMSUNG
1155
+ #ifdef DECODE_SAMSUNG
1141
1156
// SAMSUNGs have a repeat only 4 items long
1142
1157
long IRrecv::decodeSAMSUNG (decode_results *results) {
1143
1158
long data = 0 ;
@@ -1194,7 +1209,7 @@ long IRrecv::decodeSAMSUNG(decode_results *results) {
1194
1209
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
1195
1210
*
1196
1211
*/
1197
- #ifdef AIWA_RC_T501
1212
+ #ifdef DECODE_AIWA_RC_T501
1198
1213
long IRrecv::decodeAiwaRCT501 (decode_results *results) {
1199
1214
int data = 0 ;
1200
1215
int offset = 1 ; // skip first garbage read
@@ -1326,7 +1341,7 @@ i.e. use 0x1C10 instead of 0x0000000000001C10 which is listed in the
1326
1341
linked LIRC file.
1327
1342
*/
1328
1343
1329
- #ifdef IRsendSHARP
1344
+ #ifdef SEND_SHARP
1330
1345
void IRsend::sendSharp (unsigned long data, int nbits) {
1331
1346
unsigned long invertdata = data ^ SHARP_TOGGLE_MASK;
1332
1347
enableIROut (38 );
@@ -1360,7 +1375,7 @@ void IRsend::sendSharp(unsigned int address, unsigned int command) {
1360
1375
1361
1376
#endif
1362
1377
1363
- #ifdef IRsendDISH
1378
+ #ifdef SEND_DISH
1364
1379
void IRsend::sendDISH (unsigned long data, int nbits)
1365
1380
{
1366
1381
enableIROut (56 );
@@ -1386,7 +1401,7 @@ void IRsend::sendDISH(unsigned long data, int nbits)
1386
1401
*
1387
1402
*/
1388
1403
1389
- #ifdef AIWA_RC_T501
1404
+ #ifdef SEND_AIWA_RC_T501
1390
1405
void IRsend::sendAiwaRCT501 (int code) {
1391
1406
// PRE-DATA, 26 bits, 0x227EEC0
1392
1407
long int pre = 0x227EEC0 ;
0 commit comments