Ir esp8266 lib update and code impacts (#235)
* integrate new IRremoteESP8266 lib 2.4.2 and add new protocols IR_RC6 IR_MITSUBISHI IR_GICABLE IR_MITSUBISHI2 IR_LASERTAG IR_CARRIER_AC IR_MIDEA IR_NIKAI IR_SHERWOOD IR_DENON IR_AIWA_RC_T501 IR_JVC
This commit is contained in:
1 parent
9b258723a8
commit
b12ee19979
130 files changed
+16548
-1693
No files matched your search
@@ -4,7 +4,6 @@
|
||||
#include <algorithm>
|
||||
#include "IRrecv.h"
|
||||
#include "IRsend.h"
|
||||
#include "IRtimer.h"
|
||||
#include "IRutils.h"
|
||||
|
||||
// SSSS H H AAA RRRR PPPP
|
||||
@@ -13,6 +12,11 @@
|
||||
// S H H A A R R P
|
||||
// SSSS H H A A R R P
|
||||
|
||||
// Equipment it seems compatible with:
|
||||
// * Sharp LC-52D62U
|
||||
// * <Add models (devices & remotes) you've gotten it working with here>
|
||||
//
|
||||
|
||||
// Constants
|
||||
// period time = 1/38000Hz = 26.316 microseconds.
|
||||
// Ref:
|
||||
@@ -56,25 +60,18 @@
|
||||
// http://www.mwftr.com/ucF08/LEC14%20PIC%20IR.pdf
|
||||
// http://www.hifi-remote.com/johnsfine/DecodeIR.html#Sharp
|
||||
void IRsend::sendSharpRaw(uint64_t data, uint16_t nbits, uint16_t repeat) {
|
||||
// Set 38kHz IR carrier frequency & a 1/3 (33%) duty cycle.
|
||||
enableIROut(38, 33);
|
||||
|
||||
for (uint16_t i = 0; i <= repeat; i++) {
|
||||
// Protocol demands that the data be sent twice; once normally,
|
||||
// then with all but the address bits inverted.
|
||||
// Note: Previously this used to be performed 3 times (normal, inverted,
|
||||
// normal), however all data points to that being incorrect.
|
||||
for (uint8_t n = 0; n < 2; n++) {
|
||||
// No Header
|
||||
|
||||
// Data
|
||||
sendData(SHARP_BIT_MARK, SHARP_ONE_SPACE,
|
||||
SHARP_BIT_MARK, SHARP_ZERO_SPACE,
|
||||
data, nbits, true);
|
||||
// Footer
|
||||
mark(SHARP_BIT_MARK);
|
||||
space(SHARP_GAP);
|
||||
|
||||
sendGeneric(0, 0, // No Header
|
||||
SHARP_BIT_MARK, SHARP_ONE_SPACE,
|
||||
SHARP_BIT_MARK, SHARP_ZERO_SPACE,
|
||||
SHARP_BIT_MARK, SHARP_GAP,
|
||||
data, nbits, 38, true, 0, // Repeats are handled already.
|
||||
33);
|
||||
// Invert the data per protocol. This is always called twice, so it's
|
||||
// retured to original upon exiting the inner loop.
|
||||
data ^= SHARP_TOGGLE_MASK;
|
||||
@@ -165,7 +162,7 @@ void IRsend::sendSharp(uint16_t address, uint16_t command, uint16_t nbits,
|
||||
// Returns:
|
||||
// boolean: True if it can decode it, false if it can't.
|
||||
//
|
||||
// Status: BETA / Should work okay.
|
||||
// Status: STABLE / Working fine.
|
||||
//
|
||||
// Note:
|
||||
// This procedure returns a value suitable for use in sendSharpRaw().
|
||||
|
||||
Reference in new issue
Block a user