8000 Revert "Added Aiwa protocol (remote control RC-T501)." · githubgrax/Arduino-IRremote@27ab67a · GitHub
[go: up one dir, main page]

Skip to content

Commit 27ab67a

Browse files
committed
Revert "Added Aiwa protocol (remote control RC-T501)."
1 parent ce1c79b commit 27ab67a

File tree

5 files changed

+0
-162
lines changed

5 files changed

+0
-162
lines changed

IRremote.cpp

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -506,13 +506,6 @@ int IRrecv::decode(decode_results *results) {
506506
if (decodeWhynter(results)) {
507507
return DECODED;
508508
}
509-
// Aiwa RC-T501
510-
#ifdef DEBUG
511-
Serial.println("Attempting Aiwa RC-T501 decode");
512-
#endif
513-
if (decodeAiwaRCT501(results)) {
514-
return DECODED;
515-
}
516509
// decodeHash returns a hash on any input.
517510
// Thus, it needs to be last in the list.
518511
// If you add any decodes, add them before this.
@@ -1124,65 +1117,6 @@ long IRrecv::decodeSAMSUNG(decode_results *results) {
11241117
return DECODED;
11251118
}
11261119

1127-
/**
1128-
* Aiwa system
1129-
* Remote control RC-T501
1130-
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
1131-
*
1132-
*/
1133-
long IRrecv::decodeAiwaRCT501(decode_results *results) {
1134-
int data = 0;
1135-
int offset = 1; // skip first garbage read
1136-
1137-
// Check SIZE
1138-
if(irparams.rawlen < 2 * (AIWA_RC_T501_SUM_BITS) + 4) {
1139-
return ERR;
1140-
}
1141-
1142-
// Check HDR
1143-
if(!MATCH_MARK(results->rawbuf[offset], AIWA_RC_T501_HDR_MARK)) {
1144-
return ERR;
1145-
}
1146-
offset++;
1147-
1148-
// Check HDR space
1149-
if(!MATCH_SPACE(results->rawbuf[offset], AIWA_RC_T501_HDR_SPACE)) {
1150-
return ERR;
1151-
}
1152-
offset++;
1153-
1154-
offset += 26; // skip pre-data - optional
1155-
while(offset < irparams.rawlen - 4) {
1156-
if(MATCH_MARK(results->rawbuf[offset], AIWA_RC_T501_BIT_MARK)) {
1157-
offset++;
1158-
}
1159-
else {
1160-
return ERR;
1161-
}
1162-
1163-
// ONE & ZERO
1164-
if(MATCH_SPACE(results->rawbuf[offset], AIWA_RC_T501_ONE_SPACE)) {
1165-
data = (data << 1) | 1;
1166-
}
1167-
else if(MATCH_SPACE(results->rawbuf[offset], AIWA_RC_T501_ZERO_SPACE)) {
1168-
data <<= 1;
1169-
}
1170-
else {
1171-
// End of one & zero detected
1172-
break;
1173-
}
1174-
offset++;
1175-
}
1176-
1177-
results->bits = (offset - 1) / 2;
1178-
if(results->bits < 42) {
1179-
return ERR;
1180-
}
1181-
results->value = data;
1182-
results->decode_type = AIWA_RC_T501;
1183-
return DECODED;
1184-
}
1185-
11861120
/* -----------------------------------------------------------------------
11871121
* hashdecode - decode an arbitrary IR code.
11881122
* Instead of decoding using a standard encoding scheme
@@ -1305,53 +1239,3 @@ void IRsend::sendDISH(unsigned long data, int nbits) {
13051239
data <<= 1;
13061240
}
13071241
}
1308-
1309-
/**
1310-
* Aiwa system
1311-
* Remote control RC-T501
1312-
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
1313-
*
1314-
*/
1315-
void IRsend::sendAiwaRCT501(int code) {
1316-
// PRE-DATA, 26 bits, 0x227EEC0
1317-
long int pre = 0x227EEC0;
1318-
int i;
1319-
1320-
enableIROut(AIWA_RC_T501_HZ);
1321-
1322-
// HDR mark + HDR space
1323-
mark(AIWA_RC_T501_HDR_MARK);
1324-
space(AIWA_RC_T501_HDR_SPACE);
1325-
1326-
// Skip leading zero's
1327-
pre <<= 6;
1328-
// Send pre-data
1329-
for(i=0; i < 26; i++) {
1330-
mark(AIWA_RC_T501_BIT_MARK);
1331-
if(pre & TOPBIT) {
1332-
space(AIWA_RC_T501_ONE_SPACE);
1333-
} else {
1334-
space(AIWA_RC_T501_ZERO_SPACE);
1335-
}
1336-
pre <<= 1;
1337-
}
1338-
1339-
// Skip firts code bit
1340-
code <<= 1;
1341-
// Send code
1342-
for(i=0; i < 15; i++) {
1343-
mark(AIWA_RC_T501_BIT_MARK);
1344-
if(code & TOPBIT) {
1345-
space(AIWA_RC_T501_ONE_SPACE);
1346-
} else {
1347-
space(AIWA_RC_T501_ZERO_SPACE);
1348-
}
1349-
code <<= 1;
1350-
}
1351-
// POST-DATA, 1 bit, 0x0
1352-
mark(AIWA_RC_T501_BIT_MARK);
1353-
space(AIWA_RC_T501_ZERO_SPACE);
1354-
1355-
mark(AIWA_RC_T501_BIT_MARK);
1356-
space(0);
1357-
}

IRremote.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class decode_results {
5353
#define SAMSUNG 11
5454
#define LG 12
5555
#define WHYNTER 13
56-
#define AIWA_RC_T501 14
5756
#define UNKNOWN -1
5857

5958
// Decoded value for NEC when a repeat code is received
@@ -82,7 +81,6 @@ class IRrecv
8281
long decodeJVC(decode_results *results);
8382
long decodeSAMSUNG(decode_results *results);
8483
long decodeWhynter(decode_results *results);
85-
long decodeAiwaRCT501(decode_results *results);
8684
long decodeHash(decode_results *results);
8785
int compare(unsigned int oldval, unsigned int newval);
8886

@@ -113,7 +111,6 @@ class IRsend
113111
void sendSharpRaw(unsigned long data, int nbits);
114112
void sendPanasonic(unsigned int address, unsigned long data);
115113
void sendJVC(unsigned long data, int nbits, int repeat); // *Note instead of sending the REPEAT constant if you want the JVC repeat signal sent, send the original code value and change the repeat argument from 0 to 1. JVC protocol repeats by skipping the header NOT by sending a separate code value like NEC does.
116-
void sendAiwaRCT501(int code);
117114
// private:
118115
void sendSAMSUNG(unsigned long data, int nbits);
119116
void enableIROut(int khz);

IRremoteInt.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -190,20 +190,6 @@
190190
#define SHARP_BITS 15
191191
#define DISH_BITS 16
192192

193-
// AIWA RC T501
194-
// Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
195-
#define AIWA_RC_T501_HZ 38
196-
#define AIWA_RC_T501_BITS 15
197-
#define AIWA_RC_T501_PRE_BITS 26
198-
#define AIWA_RC_T501_POST_BITS 1
199-
#define AIWA_RC_T501_SUM_BITS AIWA_RC_T501_PRE_BITS+AIWA_RC_T501_BITS+AIWA_RC_T501_POST_BITS
200-
#define AIWA_RC_T501_HDR_MARK 8800
201-
#define AIWA_RC_T501_HDR_SPACE 4500
202-
#define AIWA_RC_T501_BIT_MARK 500
203-
#define AIWA_RC_T501_ONE_SPACE 600
204-
#define AIWA_RC_T501_ZERO_SPACE 1700
205-
206-
207193
#define TOLERANCE 25 // percent tolerance in measurements
208194
#define LTOL (1.0 - TOLERANCE/100.)
209195
#define UTOL (1.0 + TOLERANCE/100.)

examples/AiwaRCT501SendDemo/AiwaRCT501SendDemo.ino

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/IRrecvDump/IRrecvDump.ino

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ void dump(decode_results *results) {
5454
}
5555
else if (results->decode_type == JVC) {
5656
Serial.print("Decoded JVC: ");
57-
58-
}
59-
else if (results->decode_type == AIWA_RC_T501) {
60-
Serial.print("Decoded AIWA RC T501: ");
6157
}
6258
else if (results->decode_type == WHYNTER) {
6359
Serial.print("Decoded Whynter: ");

0 commit 3064 comments

Comments
 (0)
0