Non-important warnings removed

Commit amended by Adam Honse <calcprogrammer1@gmail.com> due to merging from a different branch.
This commit is contained in:
k1-801 2020-08-29 15:45:31 +04:00 committed by Adam Honse
parent 94c18fc9b4
commit 8b8451017e
41 changed files with 216 additions and 199 deletions

View file

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

View file

@ -41,18 +41,6 @@ enum
TECKNET_BRIGHTNESS_HIGH = 0x03
};
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
};
enum
{
TECKNET_SPEED_OFF = 0x00, // Breathe Off

View file

@ -29,7 +29,7 @@ enum
TECKNET_USAGE_PAGE = 3
};
static const unsigned int tecknet_pids[][4] =
static const int tecknet_pids[][4] =
{ // PID, Interface, Usage, Usage_Page
{ TECKNET_M0008_PID, 0, TECKNET_M0008_U, TECKNET_M0008_UPG } //Tecknet M008 Mouse
};