Send mode data block when updating mode
This commit is contained in:
parent
0270c745ce
commit
450f438538
6 changed files with 269 additions and 8 deletions
|
|
@ -192,7 +192,7 @@ void NetworkClient::ListenThread()
|
|||
|
||||
do
|
||||
{
|
||||
bytes_read += port.tcp_listen(&data[bytes_read], 128);
|
||||
bytes_read += port.tcp_listen(&data[bytes_read], header.pkt_size - bytes_read);
|
||||
} while (bytes_read < header.pkt_size);
|
||||
}
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ void NetworkClient::SendRequest_RGBController_SetCustomMode(unsigned int dev_idx
|
|||
port.tcp_client_write((char *)&reply_hdr, sizeof(NetPacketHeader));
|
||||
}
|
||||
|
||||
void NetworkClient::SendRequest_RGBController_UpdateMode(unsigned int dev_idx)
|
||||
void NetworkClient::SendRequest_RGBController_UpdateMode(unsigned int dev_idx, unsigned char * data, unsigned int size)
|
||||
{
|
||||
NetPacketHeader reply_hdr;
|
||||
|
||||
|
|
@ -372,7 +372,8 @@ void NetworkClient::SendRequest_RGBController_UpdateMode(unsigned int dev_idx)
|
|||
|
||||
reply_hdr.pkt_dev_idx = dev_idx;
|
||||
reply_hdr.pkt_id = NET_PACKET_ID_RGBCONTROLLER_UPDATEMODE;
|
||||
reply_hdr.pkt_size = 0;
|
||||
reply_hdr.pkt_size = size;
|
||||
|
||||
port.tcp_client_write((char *)&reply_hdr, sizeof(NetPacketHeader));
|
||||
port.tcp_client_write((char *)data, size);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue