mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-05 06:34:25 -04:00
Non-important warnings removed
Commit amended by Adam Honse <calcprogrammer1@gmail.com> due to merging from a different branch.
This commit is contained in:
@@ -9,6 +9,18 @@
|
||||
|
||||
#include "TecknetController.h"
|
||||
|
||||
static unsigned char tecknet_colour_mode_data[][16] =
|
||||
{
|
||||
{ 0x02, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00 }, // Static
|
||||
{ 0x02, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00 }, // Breathing
|
||||
};
|
||||
|
||||
static unsigned char tecknet_speed_mode_data[][9] =
|
||||
{
|
||||
{ 0x00, 0x00, 0x00, 0x00 }, // Static
|
||||
{ 0x00, 0x06, 0x03, 0x01 }, // Breathing
|
||||
};
|
||||
|
||||
TecknetController::TecknetController(hid_device* dev_handle, char *_path)
|
||||
{
|
||||
const int szTemp = 256;
|
||||
@@ -79,17 +91,17 @@ void TecknetController::SendUpdate()
|
||||
unsigned char buffer[TECKNET_PACKET_LENGTH] = { 0x00 };
|
||||
int buffer_size = (sizeof(buffer) / sizeof(buffer[0]));
|
||||
|
||||
for(int i = 0; i < TECKNET_COLOUR_MODE_DATA_SIZE; i++)
|
||||
for(std::size_t i = 0; i < TECKNET_COLOUR_MODE_DATA_SIZE; i++)
|
||||
{
|
||||
buffer[i] = tecknet_colour_mode_data[current_mode][i];
|
||||
}
|
||||
|
||||
//Set the relevant colour info
|
||||
buffer[TECKNET_RED_BYTE] = current_red;
|
||||
buffer[TECKNET_GREEN_BYTE] = current_green;
|
||||
buffer[TECKNET_BLUE_BYTE] = current_blue;
|
||||
buffer[TECKNET_RED_BYTE] = current_red;
|
||||
buffer[TECKNET_GREEN_BYTE] = current_green;
|
||||
buffer[TECKNET_BLUE_BYTE] = current_blue;
|
||||
buffer[TECKNET_BRIGHTNESS_BYTE] = current_brightness;
|
||||
buffer[TECKNET_SPEED_BYTE] = tecknet_speed_mode_data[current_mode][current_speed];
|
||||
buffer[TECKNET_SPEED_BYTE] = tecknet_speed_mode_data[current_mode][current_speed];
|
||||
|
||||
hid_send_feature_report(dev, buffer, buffer_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user