This commit is contained in:
2024-12-25 16:56:18 +03:00
parent 6375c4eed5
commit 37522f974f
2 changed files with 9 additions and 5 deletions

View File

@ -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;