mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2026-01-07 13:52:47 +00:00
Abbreviated (Panasonic) address handling
This commit is contained in:
23
IRremote.h
23
IRremote.h
@@ -69,7 +69,10 @@ int MATCH (int measured, int desired) ;
|
||||
// #define TEST
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
enum decode_type_t {
|
||||
// An enumerated list of all supported formats
|
||||
//
|
||||
typedef
|
||||
enum {
|
||||
UNKNOWN = -1,
|
||||
UNUSED = 0,
|
||||
NEC = 1,
|
||||
@@ -86,25 +89,27 @@ enum decode_type_t {
|
||||
LG = 12,
|
||||
WHYNTER = 13,
|
||||
AIWA_RC_T501 = 14,
|
||||
};
|
||||
}
|
||||
decode_type_t;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Results returned from the decoder
|
||||
class decode_results {
|
||||
//
|
||||
class decode_results
|
||||
{
|
||||
public:
|
||||
decode_type_t decode_type; // NEC, SONY, RC5, UNKNOWN
|
||||
union { // This is used for decoding Panasonic and Sharp data
|
||||
unsigned int panasonicAddress;
|
||||
unsigned int sharpAddress;
|
||||
};
|
||||
decode_type_t decode_type; // UNKNOWN, NEC, SONY, RC5, ...
|
||||
unsigned int address; // Used by Panasonic & Sharp
|
||||
unsigned long value; // Decoded value
|
||||
int bits; // Number of bits in decoded value
|
||||
volatile unsigned int *rawbuf; // Raw intervals in .5 us ticks
|
||||
volatile unsigned int *rawbuf; // Raw intervals in 50uS ticks
|
||||
int rawlen; // Number of records in rawbuf.
|
||||
int overflow; // true iff IR raw code too long
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Decoded value for NEC when a repeat code is received
|
||||
//
|
||||
#define REPEAT 0xffffffff
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,7 +70,7 @@ long IRrecv::decodePanasonic (decode_results *results)
|
||||
}
|
||||
|
||||
results->value = (unsigned long)data;
|
||||
results->panasonicAddress = (unsigned int)(data >> 32);
|
||||
results->address = (unsigned int)(data >> 32);
|
||||
results->decode_type = PANASONIC;
|
||||
results->bits = PANASONIC_BITS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user