mirror of
				https://github.com/Show-maket/IR-protocol.git
				synced 2025-10-30 18:42:35 +00:00 
			
		
		
		
	add id change func
This commit is contained in:
		| @ -25,6 +25,10 @@ | |||||||
| class IR_Encoder; | class IR_Encoder; | ||||||
| class IR_DecoderRaw : virtual public IR_FOX { | class IR_DecoderRaw : virtual public IR_FOX { | ||||||
|     friend IR_Encoder; |     friend IR_Encoder; | ||||||
|  | protected: | ||||||
|  |     PackInfo packInfo; | ||||||
|  |     uint16_t id; | ||||||
|  |     IR_Encoder* encoder;                    // Указатель на парный передатчик | ||||||
| public: | public: | ||||||
|     const uint8_t isrPin;   // Пин прерывания  |     const uint8_t isrPin;   // Пин прерывания  | ||||||
|  |  | ||||||
| @ -40,12 +44,10 @@ public: | |||||||
|     bool available() { if (isAvailable) { isAvailable = false; return true; } else { return false; } }; |     bool available() { if (isAvailable) { isAvailable = false; return true; } else { return false; } }; | ||||||
|     bool isOverflow() { return isBufferOverflow; }; // Буффер переполнился  |     bool isOverflow() { return isBufferOverflow; }; // Буффер переполнился  | ||||||
|     bool isReciving() { return isBufferOverflow; }; // Возвращает true, если происходит приём пакета |     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: | private: | ||||||
|     ErrorsStruct errors; |     ErrorsStruct errors; | ||||||
|     bool isAvailable = false; |     bool isAvailable = false; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user