Go to the documentation of this file.
9 #ifndef _IR_BOSEWAVE_HPP
10 #define _IR_BOSEWAVE_HPP
12 #if defined(DEBUG) && !defined(LOCAL_DEBUG)
37 #define BOSEWAVE_BITS 16 // Command and inverted command
39 #define BOSEWAVE_HEADER_MARK 1014 // 1014 are 39 clock periods (I counted 3 times!)
40 #define BOSEWAVE_HEADER_SPACE 1468 // 1468(measured), 1456 are 56 clock periods
41 #define BOSEWAVE_BIT_MARK 520 // 520 are 20 clock periods
42 #define BOSEWAVE_ZERO_SPACE 468 // 468 are 18 clock periods
43 #define BOSEWAVE_ONE_SPACE 1468 // 1468(measured), 1456 are 56 clock periods
45 #define BOSEWAVE_REPEAT_PERIOD 75000
46 #define BOSEWAVE_REPEAT_DISTANCE 50000
47 #define BOSEWAVE_MAXIMUM_REPEAT_DISTANCE 62000
80 #if defined(LOCAL_DEBUG)
81 Serial.print(F(
"Bose: "));
82 Serial.println(F(
"Decode failed"));
89 #if defined(LOCAL_DEBUG)
90 Serial.print(F(
"Bose: "));
91 Serial.println(F(
"Stop bit mark length is wrong"));
99 uint8_t tCommandNotInverted = tDecodedValue & 0xFF;
100 uint8_t tCommandInverted = tDecodedValue >> 8;
102 if ((tCommandNotInverted ^ tCommandInverted) != 0xFF) {
103 #if defined(LOCAL_DEBUG)
104 Serial.print(F(
"Bose: "));
105 Serial.println(F(
"Command and inverted command check failed"));
120 #if defined(LOCAL_DEBUG)
123 #endif // _IR_BOSEWAVE_HPP
#define MICROS_PER_TICK
microseconds per clock interrupt tick
#define BOSEWAVE_HEADER_SPACE
uint16_t numberOfBits
Number of bits received for data (address + command + parity) - to determine protocol length if diffe...
void int_fast8_t aNumberOfRepeats
#define MICROS_IN_ONE_MILLI
void sendBoseWave(uint8_t aCommand, int_fast8_t aNumberOfRepeats=NO_REPEATS)
void sendPulseDistanceWidth(PulseDistanceWidthProtocolConstants *aProtocolConstants, IRRawDataType aData, uint_fast8_t aNumberOfBits, int_fast8_t aNumberOfRepeats)
Sends PulseDistance frames and repeats.
irparams_struct * rawDataPtr
Pointer of the raw timing data to be decoded. Mainly the OverflowFlag and the data buffer filled by r...
IRRawDataType decodedRawData
Up to 32/64 bit decoded raw data, to be used for send functions.
void checkForRepeatSpaceTicksAndSetFlag(uint16_t aMaximumRepeatSpaceTicks)
#define IR_DEBUG_PRINT(...)
If DEBUG, print the arguments, otherwise do nothing.
#define BOSEWAVE_MAXIMUM_REPEAT_DISTANCE
#define BOSEWAVE_ZERO_SPACE
#define BOSEWAVE_BIT_MARK
#define PROTOCOL_IS_LSB_FIRST
#define BOSEWAVE_HEADER_MARK
bool checkHeader(PulseDistanceWidthProtocolConstants *aProtocolConstants)
bool decodePulseDistanceWidthData(PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, IRRawlenType aStartOffset=3)
Decode pulse distance protocols for PulseDistanceWidthProtocolConstants.
uint16_t command
Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort.
#define BOSEWAVE_ONE_SPACE
bool matchMark(uint16_t aMeasuredTicks, uint16_t aMatchValueMicros)
Compensate for marks exceeded by demodulator hardware.
#define BOSEWAVE_REPEAT_PERIOD
IRRawbufType rawbuf[RAW_BUFFER_LENGTH]
raw data / tick counts per mark/space. With 8 bit we can only store up to 12.7 ms....
IRRawlenType rawlen
counter of entries in rawbuf of last received frame.
#define IR_DEBUG_PRINTLN(...)
If DEBUG, print the arguments as a line, otherwise do nothing.
struct PulseDistanceWidthProtocolConstants BoseWaveProtocolConstants
decode_type_t protocol
UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ...