mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2026-01-08 06:02:49 +00:00
merging 110
This commit is contained in:
84
IRremote.cpp
84
IRremote.cpp
@@ -74,6 +74,7 @@ int MATCH_SPACE(int measured_ticks, int desired_us) {return MATCH(measured_ticks
|
|||||||
// Debugging versions are in IRremote.cpp
|
// Debugging versions are in IRremote.cpp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NEC
|
||||||
void IRsend::sendNEC(unsigned long data, int nbits)
|
void IRsend::sendNEC(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -93,7 +94,9 @@ void IRsend::sendNEC(unsigned long data, int nbits)
|
|||||||
mark(NEC_BIT_MARK);
|
mark(NEC_BIT_MARK);
|
||||||
space(0);
|
space(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WHYNTER
|
||||||
void IRsend::sendWhynter(unsigned long data, int nbits) {
|
void IRsend::sendWhynter(unsigned long data, int nbits) {
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
mark(WHYNTER_ZERO_MARK);
|
mark(WHYNTER_ZERO_MARK);
|
||||||
@@ -114,7 +117,9 @@ void IRsend::sendWhynter(unsigned long data, int nbits) {
|
|||||||
mark(WHYNTER_ZERO_MARK);
|
mark(WHYNTER_ZERO_MARK);
|
||||||
space(WHYNTER_ZERO_SPACE);
|
space(WHYNTER_ZERO_SPACE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SONY
|
||||||
void IRsend::sendSony(unsigned long data, int nbits) {
|
void IRsend::sendSony(unsigned long data, int nbits) {
|
||||||
enableIROut(40);
|
enableIROut(40);
|
||||||
mark(SONY_HDR_MARK);
|
mark(SONY_HDR_MARK);
|
||||||
@@ -132,6 +137,7 @@ void IRsend::sendSony(unsigned long data, int nbits) {
|
|||||||
data <<= 1;
|
data <<= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void IRsend::sendRaw(unsigned int buf[], int len, int hz)
|
void IRsend::sendRaw(unsigned int buf[], int len, int hz)
|
||||||
{
|
{
|
||||||
@@ -200,6 +206,8 @@ void IRsend::sendRC6(unsigned long data, int nbits)
|
|||||||
}
|
}
|
||||||
space(0); // Turn off at end
|
space(0); // Turn off at end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PANASONIC
|
||||||
void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
|
void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
|
||||||
enableIROut(35);
|
enableIROut(35);
|
||||||
mark(PANASONIC_HDR_MARK);
|
mark(PANASONIC_HDR_MARK);
|
||||||
@@ -227,6 +235,9 @@ void IRsend::sendPanasonic(unsigned int address, unsigned long data) {
|
|||||||
mark(PANASONIC_BIT_MARK);
|
mark(PANASONIC_BIT_MARK);
|
||||||
space(0);
|
space(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef JVC
|
||||||
void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
|
void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
|
||||||
{
|
{
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -249,7 +260,9 @@ void IRsend::sendJVC(unsigned long data, int nbits, int repeat)
|
|||||||
mark(JVC_BIT_MARK);
|
mark(JVC_BIT_MARK);
|
||||||
space(0);
|
space(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SAMSUNG
|
||||||
void IRsend::sendSAMSUNG(unsigned long data, int nbits)
|
void IRsend::sendSAMSUNG(unsigned long data, int nbits)
|
||||||
{
|
{
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
@@ -269,6 +282,7 @@ void IRsend::sendSAMSUNG(unsigned long data, int nbits)
|
|||||||
mark(SAMSUNG_BIT_MARK);
|
mark(SAMSUNG_BIT_MARK);
|
||||||
space(0);
|
space(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void IRsend::mark(int time) {
|
void IRsend::mark(int time) {
|
||||||
// Sends an IR mark for the specified number of microseconds.
|
// Sends an IR mark for the specified number of microseconds.
|
||||||
@@ -440,48 +454,70 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
if (irparams.rcvstate != STATE_STOP) {
|
if (irparams.rcvstate != STATE_STOP) {
|
||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
|
#ifdef NEC
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting NEC decode");
|
Serial.println("Attempting NEC decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeNEC(results)) {
|
if (decodeNEC(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SONY
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Sony decode");
|
Serial.println("Attempting Sony decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeSony(results)) {
|
if (decodeSony(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SANYO
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Sanyo decode");
|
Serial.println("Attempting Sanyo decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeSanyo(results)) {
|
if (decodeSanyo(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MITSUBISHI
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Mitsubishi decode");
|
Serial.println("Attempting Mitsubishi decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeMitsubishi(results)) {
|
if (decodeMitsubishi(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RC5
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting RC5 decode");
|
Serial.println("Attempting RC5 decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeRC5(results)) {
|
if (decodeRC5(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RC6
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting RC6 decode");
|
Serial.println("Attempting RC6 decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeRC6(results)) {
|
if (decodeRC6(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PANASONIC
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Panasonic decode");
|
Serial.println("Attempting Panasonic decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodePanasonic(results)) {
|
if (decodePanasonic(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef JVC
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting LG decode");
|
Serial.println("Attempting LG decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -494,6 +530,9 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
if (decodeJVC(results)) {
|
if (decodeJVC(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SAMSUNG
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting SAMSUNG decode");
|
Serial.println("Attempting SAMSUNG decode");
|
||||||
#endif
|
#endif
|
||||||
@@ -507,12 +546,15 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
// Aiwa RC-T501
|
// Aiwa RC-T501
|
||||||
|
#ifdef AIWA_RC_T501
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.println("Attempting Aiwa RC-T501 decode");
|
Serial.println("Attempting Aiwa RC-T501 decode");
|
||||||
#endif
|
#endif
|
||||||
if (decodeAiwaRCT501(results)) {
|
if (decodeAiwaRCT501(results)) {
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// decodeHash returns a hash on any input.
|
// decodeHash returns a hash on any input.
|
||||||
// Thus, it needs to be last in the list.
|
// Thus, it needs to be last in the list.
|
||||||
// If you add any decodes, add them before this.
|
// If you add any decodes, add them before this.
|
||||||
@@ -524,6 +566,7 @@ int IRrecv::decode(decode_results *results) {
|
|||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NEC
|
||||||
// NECs have a repeat only 4 items long
|
// NECs have a repeat only 4 items long
|
||||||
long IRrecv::decodeNEC(decode_results *results) {
|
long IRrecv::decodeNEC(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
@@ -572,7 +615,9 @@ long IRrecv::decodeNEC(decode_results *results) {
|
|||||||
results->decode_type = NEC;
|
results->decode_type = NEC;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SONY
|
||||||
long IRrecv::decodeSony(decode_results *results) {
|
long IRrecv::decodeSony(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
if (irparams.rawlen < 2 * SONY_BITS + 2) {
|
if (irparams.rawlen < 2 * SONY_BITS + 2) {
|
||||||
@@ -586,7 +631,11 @@ long IRrecv::decodeSony(decode_results *results) {
|
|||||||
// Serial.print("IR Gap found: ");
|
// Serial.print("IR Gap found: ");
|
||||||
results->bits = 0;
|
results->bits = 0;
|
||||||
results->value = REPEAT;
|
results->value = REPEAT;
|
||||||
|
#ifdef SANYO
|
||||||
results->decode_type = SANYO;
|
results->decode_type = SANYO;
|
||||||
|
#else
|
||||||
|
results->decode_type = UNKNOWN;
|
||||||
|
#endif
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
offset++;
|
offset++;
|
||||||
@@ -624,6 +673,7 @@ long IRrecv::decodeSony(decode_results *results) {
|
|||||||
results->decode_type = SONY;
|
results->decode_type = SONY;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
long IRrecv::decodeWhynter(decode_results *results) {
|
long IRrecv::decodeWhynter(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
@@ -684,6 +734,7 @@ long IRrecv::decodeWhynter(decode_results *results) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SANYO
|
||||||
// I think this is a Sanyo decoder - serial = SA 8650B
|
// I think this is a Sanyo decoder - serial = SA 8650B
|
||||||
// Looks like Sony except for timings, 48 chars of data and time/space different
|
// Looks like Sony except for timings, 48 chars of data and time/space different
|
||||||
long IRrecv::decodeSanyo(decode_results *results) {
|
long IRrecv::decodeSanyo(decode_results *results) {
|
||||||
@@ -747,7 +798,9 @@ long IRrecv::decodeSanyo(decode_results *results) {
|
|||||||
results->decode_type = SANYO;
|
results->decode_type = SANYO;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MITSUBISHI
|
||||||
// Looks like Sony except for timings, 48 chars of data and time/space different
|
// Looks like Sony except for timings, 48 chars of data and time/space different
|
||||||
long IRrecv::decodeMitsubishi(decode_results *results) {
|
long IRrecv::decodeMitsubishi(decode_results *results) {
|
||||||
// Serial.print("?!? decoding Mitsubishi:");Serial.print(irparams.rawlen); Serial.print(" want "); Serial.println( 2 * MITSUBISHI_BITS + 2);
|
// Serial.print("?!? decoding Mitsubishi:");Serial.print(irparams.rawlen); Serial.print(" want "); Serial.println( 2 * MITSUBISHI_BITS + 2);
|
||||||
@@ -811,7 +864,7 @@ long IRrecv::decodeMitsubishi(decode_results *results) {
|
|||||||
results->decode_type = MITSUBISHI;
|
results->decode_type = MITSUBISHI;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Gets one undecoded level at a time from the raw buffer.
|
// Gets one undecoded level at a time from the raw buffer.
|
||||||
// The RC5/6 decoding is easier if the data is broken into time intervals.
|
// The RC5/6 decoding is easier if the data is broken into time intervals.
|
||||||
@@ -858,6 +911,7 @@ int IRrecv::getRClevel(decode_results *results, int *offset, int *used, int t1)
|
|||||||
#endif
|
#endif
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
long IRrecv::decodeRC5(decode_results *results) {
|
long IRrecv::decodeRC5(decode_results *results) {
|
||||||
if (irparams.rawlen < MIN_RC5_SAMPLES + 2) {
|
if (irparams.rawlen < MIN_RC5_SAMPLES + 2) {
|
||||||
@@ -944,6 +998,8 @@ long IRrecv::decodeRC6(decode_results *results) {
|
|||||||
results->decode_type = RC6;
|
results->decode_type = RC6;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PANASONIC
|
||||||
long IRrecv::decodePanasonic(decode_results *results) {
|
long IRrecv::decodePanasonic(decode_results *results) {
|
||||||
unsigned long long data = 0;
|
unsigned long long data = 0;
|
||||||
int offset = 1;
|
int offset = 1;
|
||||||
@@ -977,7 +1033,9 @@ long IRrecv::decodePanasonic(decode_results *results) {
|
|||||||
results->bits = PANASONIC_BITS;
|
results->bits = PANASONIC_BITS;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LG
|
||||||
long IRrecv::decodeLG(decode_results *results) {
|
long IRrecv::decodeLG(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
int offset = 1; // Skip first space
|
int offset = 1; // Skip first space
|
||||||
@@ -1023,6 +1081,9 @@ long IRrecv::decodeLG(decode_results *results) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef JVC
|
||||||
long IRrecv::decodeJVC(decode_results *results) {
|
long IRrecv::decodeJVC(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
int offset = 1; // Skip first space
|
int offset = 1; // Skip first space
|
||||||
@@ -1074,7 +1135,9 @@ long IRrecv::decodeJVC(decode_results *results) {
|
|||||||
results->decode_type = JVC;
|
results->decode_type = JVC;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SAMSUNG
|
||||||
// SAMSUNGs have a repeat only 4 items long
|
// SAMSUNGs have a repeat only 4 items long
|
||||||
long IRrecv::decodeSAMSUNG(decode_results *results) {
|
long IRrecv::decodeSAMSUNG(decode_results *results) {
|
||||||
long data = 0;
|
long data = 0;
|
||||||
@@ -1123,6 +1186,7 @@ long IRrecv::decodeSAMSUNG(decode_results *results) {
|
|||||||
results->decode_type = SAMSUNG;
|
results->decode_type = SAMSUNG;
|
||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Aiwa system
|
* Aiwa system
|
||||||
@@ -1130,6 +1194,7 @@ long IRrecv::decodeSAMSUNG(decode_results *results) {
|
|||||||
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
|
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#ifdef AIWA_RC_T501
|
||||||
long IRrecv::decodeAiwaRCT501(decode_results *results) {
|
long IRrecv::decodeAiwaRCT501(decode_results *results) {
|
||||||
int data = 0;
|
int data = 0;
|
||||||
int offset = 1; // skip first garbage read
|
int offset = 1; // skip first garbage read
|
||||||
@@ -1183,6 +1248,8 @@ long IRrecv::decodeAiwaRCT501(decode_results *results) {
|
|||||||
return DECODED;
|
return DECODED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
* hashdecode - decode an arbitrary IR code.
|
* hashdecode - decode an arbitrary IR code.
|
||||||
* Instead of decoding using a standard encoding scheme
|
* Instead of decoding using a standard encoding scheme
|
||||||
@@ -1259,7 +1326,9 @@ i.e. use 0x1C10 instead of 0x0000000000001C10 which is listed in the
|
|||||||
linked LIRC file.
|
linked LIRC file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void IRsend::sendSharpRaw(unsigned long data, int nbits) {
|
#ifdef IRsendSHARP
|
||||||
|
void IRsend::sendSharp(unsigned long data, int nbits) {
|
||||||
|
unsigned long invertdata = data ^ SHARP_TOGGLE_MASK;
|
||||||
enableIROut(38);
|
enableIROut(38);
|
||||||
|
|
||||||
// Sending codes in bursts of 3 (normal, inverted, normal) makes transmission
|
// Sending codes in bursts of 3 (normal, inverted, normal) makes transmission
|
||||||
@@ -1289,7 +1358,11 @@ void IRsend::sendSharp(unsigned int address, unsigned int command) {
|
|||||||
sendSharpRaw((address << 10) | (command << 2) | 2, 15);
|
sendSharpRaw((address << 10) | (command << 2) | 2, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRsend::sendDISH(unsigned long data, int nbits) {
|
#endif
|
||||||
|
|
||||||
|
#ifdef IRsendDISH
|
||||||
|
void IRsend::sendDISH(unsigned long data, int nbits)
|
||||||
|
{
|
||||||
enableIROut(56);
|
enableIROut(56);
|
||||||
mark(DISH_HDR_MARK);
|
mark(DISH_HDR_MARK);
|
||||||
space(DISH_HDR_SPACE);
|
space(DISH_HDR_SPACE);
|
||||||
@@ -1305,13 +1378,15 @@ void IRsend::sendDISH(unsigned long data, int nbits) {
|
|||||||
data <<= 1;
|
data <<= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Aiwa system
|
* Aiwa system
|
||||||
* Remote control RC-T501
|
* Remote control RC-T501
|
||||||
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
|
* Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef AIWA_RC_T501
|
||||||
void IRsend::sendAiwaRCT501(int code) {
|
void IRsend::sendAiwaRCT501(int code) {
|
||||||
// PRE-DATA, 26 bits, 0x227EEC0
|
// PRE-DATA, 26 bits, 0x227EEC0
|
||||||
long int pre = 0x227EEC0;
|
long int pre = 0x227EEC0;
|
||||||
@@ -1355,3 +1430,4 @@ void IRsend::sendAiwaRCT501(int code) {
|
|||||||
mark(AIWA_RC_T501_BIT_MARK);
|
mark(AIWA_RC_T501_BIT_MARK);
|
||||||
space(0);
|
space(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
68
IRremote.h
68
IRremote.h
@@ -39,6 +39,20 @@ public:
|
|||||||
int rawlen; // Number of records in rawbuf.
|
int rawlen; // Number of records in rawbuf.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Send types
|
||||||
|
#define IRsendNEC
|
||||||
|
#define IRsendSONY
|
||||||
|
#define IRsendRC5
|
||||||
|
#define IRsendRC6
|
||||||
|
#define IRsendDISH
|
||||||
|
#define IRsendSHARP
|
||||||
|
#define IRsendPANASONIC
|
||||||
|
#define IRsendJVC
|
||||||
|
#define IRsendSANYO
|
||||||
|
#define IRsendMITSUBISHI
|
||||||
|
#define IRsendSAMSUNG
|
||||||
|
#define IRsendRAW
|
||||||
|
|
||||||
// Values for decode_type
|
// Values for decode_type
|
||||||
#define NEC 1
|
#define NEC 1
|
||||||
#define SONY 2
|
#define SONY 2
|
||||||
@@ -71,18 +85,45 @@ public:
|
|||||||
private:
|
private:
|
||||||
// These are called by decode
|
// These are called by decode
|
||||||
int getRClevel(decode_results *results, int *offset, int *used, int t1);
|
int getRClevel(decode_results *results, int *offset, int *used, int t1);
|
||||||
|
#ifdef NEC
|
||||||
long decodeNEC(decode_results *results);
|
long decodeNEC(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef SONY
|
||||||
long decodeSony(decode_results *results);
|
long decodeSony(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef SANYO
|
||||||
long decodeSanyo(decode_results *results);
|
long decodeSanyo(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef MITSUBISHI
|
||||||
long decodeMitsubishi(decode_results *results);
|
long decodeMitsubishi(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef RC5
|
||||||
long decodeRC5(decode_results *results);
|
long decodeRC5(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef RC6
|
||||||
long decodeRC6(decode_results *results);
|
long decodeRC6(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef PANASONIC
|
||||||
long decodePanasonic(decode_results *results);
|
long decodePanasonic(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef LG
|
||||||
long decodeLG(decode_results *results);
|
long decodeLG(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef JVC
|
||||||
long decodeJVC(decode_results *results);
|
long decodeJVC(decode_results *results);
|
||||||
|
#endif
|
||||||
|
#ifdef SAMSUNG
|
||||||
long decodeSAMSUNG(decode_results *results);
|
long decodeSAMSUNG(decode_results *results);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WHYNTER
|
||||||
long decodeWhynter(decode_results *results);
|
long decodeWhynter(decode_results *results);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AIWA_RC_T501
|
||||||
long decodeAiwaRCT501(decode_results *results);
|
long decodeAiwaRCT501(decode_results *results);
|
||||||
|
#endif
|
||||||
|
|
||||||
long decodeHash(decode_results *results);
|
long decodeHash(decode_results *results);
|
||||||
int compare(unsigned int oldval, unsigned int newval);
|
int compare(unsigned int oldval, unsigned int newval);
|
||||||
|
|
||||||
@@ -99,23 +140,44 @@ class IRsend
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IRsend() {}
|
IRsend() {}
|
||||||
|
void sendRaw(unsigned int buf[], int len, int hz);
|
||||||
|
void sendRC5(unsigned long data, int nbits);
|
||||||
|
void sendRC6(unsigned long data, int nbits);
|
||||||
|
|
||||||
|
#ifdef WHYNTER
|
||||||
void sendWhynter(unsigned long data, int nbits);
|
void sendWhynter(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
|
#ifdef NEC
|
||||||
void sendNEC(unsigned long data, int nbits);
|
void sendNEC(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
|
#ifdef SONY
|
||||||
void sendSony(unsigned long data, int nbits);
|
void sendSony(unsigned long data, int nbits);
|
||||||
// Neither Sanyo nor Mitsubishi send is implemented yet
|
// Neither Sanyo nor Mitsubishi send is implemented yet
|
||||||
// void sendSanyo(unsigned long data, int nbits);
|
// void sendSanyo(unsigned long data, int nbits);
|
||||||
// void sendMitsubishi(unsigned long data, int nbits);
|
// void sendMitsubishi(unsigned long data, int nbits);
|
||||||
void sendRaw(unsigned int buf[], int len, int hz);
|
#endif
|
||||||
void sendRC5(unsigned long data, int nbits);
|
|
||||||
void sendRC6(unsigned long data, int nbits);
|
#ifdef DISH
|
||||||
void sendDISH(unsigned long data, int nbits);
|
void sendDISH(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
|
#ifdef SHARP
|
||||||
void sendSharp(unsigned int address, unsigned int command);
|
void sendSharp(unsigned int address, unsigned int command);
|
||||||
void sendSharpRaw(unsigned long data, int nbits);
|
void sendSharpRaw(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
|
#ifdef IRsendSHARP
|
||||||
|
void sendSharp(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
|
#ifdef PANASONIC
|
||||||
void sendPanasonic(unsigned int address, unsigned long data);
|
void sendPanasonic(unsigned int address, unsigned long data);
|
||||||
|
#endif
|
||||||
|
#ifdef JVC
|
||||||
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.
|
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.
|
||||||
void sendAiwaRCT501(int code);
|
void sendAiwaRCT501(int code);
|
||||||
// private:
|
// private:
|
||||||
|
#endif
|
||||||
|
#ifdef SAMSUNG
|
||||||
void sendSAMSUNG(unsigned long data, int nbits);
|
void sendSAMSUNG(unsigned long data, int nbits);
|
||||||
|
#endif
|
||||||
void enableIROut(int khz);
|
void enableIROut(int khz);
|
||||||
VIRTUAL void mark(int usec);
|
VIRTUAL void mark(int usec);
|
||||||
VIRTUAL void space(int usec);
|
VIRTUAL void space(int usec);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "IRremote.h"
|
#include "IRremote.h"
|
||||||
|
|
||||||
#define POWER 0x7F80
|
#define POWER 0x7F80
|
||||||
|
#define AIWA_RC_T501
|
||||||
|
|
||||||
IRsend irsend;
|
IRsend irsend;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user