add id change func

This commit is contained in:
DashyFox 2024-02-28 09:52:38 +03:00
parent f92851c55d
commit b7d0179092

View File

@ -25,6 +25,10 @@
class IR_Encoder;
class IR_DecoderRaw : virtual public IR_FOX {
friend IR_Encoder;
protected:
PackInfo packInfo;
uint16_t id;
IR_Encoder* encoder; // Указатель на парный передатчик
public:
const uint8_t isrPin; // Пин прерывания
@ -40,12 +44,10 @@ public:
bool available() { if (isAvailable) { isAvailable = false; return true; } else { return false; } };
bool isOverflow() { return isBufferOverflow; }; // Буффер переполнился
bool isReciving() { return isBufferOverflow; }; // Возвращает true, если происходит приём пакета
uint16_t getId() {return id;}
void setId(uint16_t id) {this->id = id;}
//////////////////////////////////////////////////////////////////////////
protected:
PackInfo packInfo;
uint16_t id;
IR_Encoder* encoder; // Указатель на парный передатчик
private:
ErrorsStruct errors;
bool isAvailable = false;