From b7d017909248c8ed8133948bfbf5ef4facd0cae0 Mon Sep 17 00:00:00 2001 From: DashyFox Date: Wed, 28 Feb 2024 09:52:38 +0300 Subject: [PATCH] add id change func --- IR_DecoderRaw.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/IR_DecoderRaw.h b/IR_DecoderRaw.h index e0a24e3..fd2577c 100644 --- a/IR_DecoderRaw.h +++ b/IR_DecoderRaw.h @@ -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;