mirror of
				https://github.com/Show-maket/IR-protocol.git
				synced 2025-10-31 11:02:36 +00:00 
			
		
		
		
	upd
This commit is contained in:
		| @ -48,7 +48,10 @@ void IR_Encoder::sendData(uint16_t addrTo, uint8_t dataByte, bool needAccept = f | ||||
|     delete[] dataPtr; | ||||
| } | ||||
|  | ||||
| void IR_Encoder::sendData(uint16_t addrTo, uint8_t *data = nullptr, uint8_t len = 0, bool needAccept = false) | ||||
| void IR_Encoder::sendData(uint16_t addrTo, uint8_t *data = nullptr, uint8_t len = 0, bool needAccept = false){ | ||||
|     sendData(id, addrTo, data, len, needAccept); | ||||
| } | ||||
| void IR_Encoder::sendData(uint16_t addrFrom, uint16_t addrTo, uint8_t *data = nullptr, uint8_t len = 0, bool needAccept = false) | ||||
| { | ||||
|     if (len > bytePerPack) | ||||
|     { | ||||
| @ -65,8 +68,8 @@ void IR_Encoder::sendData(uint16_t addrTo, uint8_t *data = nullptr, uint8_t len | ||||
|     sendBuffer[0] = msgType; | ||||
|  | ||||
|     // addr_self | ||||
|     sendBuffer[1] = id >> 8 & 0xFF; | ||||
|     sendBuffer[2] = id & 0xFF; | ||||
|     sendBuffer[1] = addrFrom >> 8 & 0xFF; | ||||
|     sendBuffer[2] = addrFrom & 0xFF; | ||||
|  | ||||
|     // addr_to | ||||
|     sendBuffer[3] = addrTo >> 8 & 0xFF; | ||||
|  | ||||
| @ -4,13 +4,13 @@ | ||||
| // TODO: Отложенная передача после завершения приема | ||||
|  | ||||
| class IR_DecoderRaw; | ||||
| class IR_Encoder : IR_FOX | ||||
| class IR_Encoder : public IR_FOX | ||||
| { | ||||
|     friend IR_DecoderRaw; | ||||
|  | ||||
| public: | ||||
| private: | ||||
|     uint16_t id; /// @brief Адрес передатчика | ||||
|     // uint16_t id; /// @brief Адрес передатчика | ||||
|  | ||||
| public: | ||||
|     /// @brief Класс передатчика | ||||
| @ -49,6 +49,7 @@ public: | ||||
|  | ||||
|     void sendData(uint16_t addrTo, uint8_t dataByte, bool needAccept = false); | ||||
|     void sendData(uint16_t addrTo, uint8_t *data = nullptr, uint8_t len = 0, bool needAccept = false); | ||||
|     void sendData(uint16_t addrFrom, uint16_t addrTo, uint8_t *data = nullptr, uint8_t len = 0, bool needAccept = false); | ||||
|  | ||||
|     void sendAccept(uint16_t addrTo, uint8_t customByte = 0); | ||||
|     void sendRequest(uint16_t addrTo); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user