mirror of
				https://github.com/Show-maket/IR-protocol.git
				synced 2025-10-31 02:52:36 +00:00 
			
		
		
		
	add default params
This commit is contained in:
		| @ -33,7 +33,7 @@ IR_Encoder::~IR_Encoder() { | |||||||
|     delete [] bitHigh; |     delete [] bitHigh; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| void IR_Encoder::sendData(uint16_t addrTo, uint8_t* data, uint8_t len, bool needAccept = false) { | void IR_Encoder::sendData(uint16_t addrTo, uint8_t* data = nullptr, uint8_t len = 0, bool needAccept = false) { | ||||||
|     if (len > bytePerPack) { return; } |     if (len > bytePerPack) { return; } | ||||||
|     constexpr uint8_t dataStart = msgBytes + addrBytes + addrBytes; |     constexpr uint8_t dataStart = msgBytes + addrBytes + addrBytes; | ||||||
|     memset(sendBuffer, 0x00, dataByteSizeMax); |     memset(sendBuffer, 0x00, dataByteSizeMax); | ||||||
|  | |||||||
| @ -44,7 +44,7 @@ public: | |||||||
|  |  | ||||||
|     void IR_Encoder::setBlindDecoders(IR_DecoderRaw* decoders [], uint8_t count); |     void IR_Encoder::setBlindDecoders(IR_DecoderRaw* decoders [], uint8_t count); | ||||||
|     void rawSend(uint8_t* ptr, uint8_t len); |     void rawSend(uint8_t* ptr, uint8_t len); | ||||||
|     void sendData(uint16_t addrTo, uint8_t* data, uint8_t len, bool needAccept = false); |     void sendData(uint16_t addrTo, uint8_t* data = nullptr, uint8_t len = 0, bool needAccept = false); | ||||||
|     void sendAccept(uint16_t addrTo, uint8_t customByte = 0); |     void sendAccept(uint16_t addrTo, uint8_t customByte = 0); | ||||||
|     void sendRequest(uint16_t addrTo); |     void sendRequest(uint16_t addrTo); | ||||||
|     void sendBack(uint8_t* data = nullptr, uint8_t len = 0); |     void sendBack(uint8_t* data = nullptr, uint8_t len = 0); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user