#pragma once #include "IR_DecoderRaw.h" #include "PacketTypes.h" #include "IR_Encoder.h" class IR_Decoder : public IR_DecoderRaw { private: // static std::list dec_list; static std::list& get_dec_list(); void _tick(); uint32_t acceptSendTimer; bool isWaitingAcceptSend; uint16_t addrAcceptSendTo; uint16_t acceptDelay = 75; uint8_t acceptCustomByte; public: PacketTypes::Data gotData; PacketTypes::DataBack gotBackData; PacketTypes::Accept gotAccept; PacketTypes::Request gotRequest; PacketTypes::BasePack gotRaw; IR_Decoder(const uint8_t pin, uint16_t addr, IR_Encoder *encPair = nullptr); ~IR_Decoder(); static void tick(); inline void setAcceptDelay(uint16_t acceptDelay) { this->acceptDelay = acceptDelay; } inline uint16_t getAcceptDelay() { return this->acceptDelay; } };