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,13 @@
|
||||
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#include <stdint.h>
|
||||
#ifdef ARDUINO
|
||||
#include <Arduino.h>
|
||||
#else
|
||||
#include <string>
|
||||
#endif
|
||||
#include "IRremoteESP8266.h"
|
||||
#include "IRrecv.h"
|
||||
#include "IRsend.h"
|
||||
|
||||
|
||||
@@ -38,16 +44,21 @@
|
||||
#define FUJITSU_AC_SWING_HORIZ 0x02U
|
||||
#define FUJITSU_AC_SWING_BOTH 0x03U
|
||||
|
||||
#define FUJITSU_AC_STATE_LENGTH 16
|
||||
#define FUJITSU_AC_STATE_LENGTH_SHORT 7
|
||||
|
||||
#if SEND_FUJITSU_AC
|
||||
enum fujitsu_ac_remote_model_t {
|
||||
ARRAH2E = 1,
|
||||
ARDB1,
|
||||
};
|
||||
|
||||
class IRFujitsuAC {
|
||||
public:
|
||||
explicit IRFujitsuAC(uint16_t pin);
|
||||
explicit IRFujitsuAC(uint16_t pin, fujitsu_ac_remote_model_t model = ARRAH2E);
|
||||
|
||||
void setModel(fujitsu_ac_remote_model_t model);
|
||||
void stateReset();
|
||||
#if SEND_FUJITSU_AC
|
||||
void send();
|
||||
#endif // SEND_FUJITSU_AC
|
||||
void begin();
|
||||
void off();
|
||||
void stepHoriz();
|
||||
@@ -63,18 +74,29 @@ class IRFujitsuAC {
|
||||
void setSwing(uint8_t mode);
|
||||
uint8_t getSwing();
|
||||
uint8_t* getRaw();
|
||||
bool setRaw(const uint8_t newState[], const uint16_t length);
|
||||
uint8_t getStateLength();
|
||||
static bool validChecksum(uint8_t *state, uint16_t length);
|
||||
bool getPower();
|
||||
#ifdef ARDUINO
|
||||
String toString();
|
||||
#else
|
||||
std::string toString();
|
||||
#endif
|
||||
|
||||
private:
|
||||
uint8_t remote_state[FUJITSU_AC_STATE_LENGTH];
|
||||
uint8_t getCommandLength();
|
||||
IRsend _irsend;
|
||||
uint8_t _temp;
|
||||
uint8_t _fanSpeed;
|
||||
uint8_t _mode;
|
||||
uint8_t _swingMode;
|
||||
uint8_t _cmd;
|
||||
fujitsu_ac_remote_model_t _model;
|
||||
uint8_t _state_length;
|
||||
uint8_t _state_length_short;
|
||||
void buildState();
|
||||
void buildFromState(const uint16_t length);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // IR_FUJITSU_H_
|
||||
Reference in new issue
Block a user