Implement complete button mapping on the M711

This commit is contained in:
dokutan 2021-11-25 20:25:43 +01:00
parent f934adb975
commit f04a4cc520
5 changed files with 53 additions and 61 deletions

View file

@ -40,10 +40,10 @@ Name | Support | VID:PID | Additional notes
Redragon M908 Impact | complete | 0x04d9:0xfc4d |
Redragon M719 Invader | complete | 0x04d9:0xfc4f |
Redragon M607 Griffin | complete | 0x04d9:0xfc38 |
Redragon M711 Cobra (FPS) | partial | 0x04d9:0xfc30 | See [this issue](https://github.com/dokutan/mouse_m908/issues/2)<br>Button mapping is not tested
Redragon M913 | partial | 0x25a7:0xfa07<br>0x25a7:0xfa08 | See [this issue](https://github.com/dokutan/mouse_m908/issues/15)<br>- Uses a different and unique protocol<br>- Not all features are implemented
Redragon M686 | experimental | 0x25a7:0xfa34<br>0x25a7:0xfa35 | See [this issue](https://github.com/dokutan/mouse_m908/issues/29)
Redragon M709 Tiger | experimental | 0x04d9:0xfc2a | See [this issue](https://github.com/dokutan/mouse_m908/issues/1)<br>- Changing the profile works<br>- Changing the settings is untested<br>- Macros are untested<br>- Reading the settings is not properly implemented due to a lack of data
Redragon M711 Cobra (FPS) | experimental | 0x04d9:0xfc30 | See [this issue](https://github.com/dokutan/mouse_m908/issues/2)<br>button mapping is not fully implemented
Redragon M715 Dagger | experimental | 0x04d9:0xfc39 | Nothing is tested<br>- The device specific code is copied from the M711 and mostly unmodified
Redragon M721-Pro Lonewolf2 | experimental | 0x04d9:0xfc5c | See [this issue](https://github.com/dokutan/mouse_m908/issues/22)<br>Nothing is tested
Redragon M990 Legend | experimental | 0x04d9:0xfc0f | See [this issue](https://github.com/dokutan/mouse_m908/issues/5)<br>This mouse uses a different data format, keycodes, etc.

View file

@ -43,9 +43,11 @@ report_rate=500
button_left=left
button_right=right
button_middle=middle
button_dpi=dpi-cycle
button_backward=backward
button_forward=forward
button_dpi_up=dpi+
button_dpi_down=dpi-
button_lightmode=led_mode_switch
scroll_up=scroll_up
scroll_down=scroll_down

View file

@ -35,9 +35,11 @@ std::map< int, std::string > mouse_m711::_c_button_names = {
{ 2, "button_middle" },
{ 3, "button_forward" },
{ 4, "button_backward" },
{ 5, "button_dpi" },
{ 6, "scroll_up" },
{ 7, "scroll_down" } };
{ 5, "button_dpi_up" },
{ 6, "button_dpi_down" },
{ 7, "button_lightmode" },
{ 8, "scroll_up" },
{ 9, "scroll_down" } };
// Mapping of real DPI values to bytecode
std::map< unsigned int, std::array<uint8_t, 2> > mouse_m711::_c_dpi_codes = {
@ -149,24 +151,6 @@ uint8_t mouse_m711::_c_data_s_profile[6][16] = {
{0x02, 0xf1, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
};
/* this is the original version, TODO! remove if changin the settings on the mouse works
uint8_t mouse_m711::_c_data_settings_1[12][16] = {
{0x02, 0xf3, 0x46, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x49, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x4f, 0x04, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x51, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x08, 0x04, 0x00, 0x00},
{0x02, 0xf3, 0x57, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x59, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x01, 0x08, 0x04, 0x00, 0x00},
{0x02, 0xf3, 0x5f, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x61, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x01, 0x08, 0x04, 0x00, 0x00},
{0x02, 0xf3, 0x67, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x69, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0x08, 0x04, 0x00, 0x00},
{0x02, 0xf3, 0x6f, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf1, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
};
*/
// this is the complete version, copied from mouse_generic
uint8_t mouse_m711::_c_data_settings_1[15][16] = {
{0x02, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x3e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
@ -192,7 +176,7 @@ uint8_t mouse_m711::_c_data_settings_2[64] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
uint8_t mouse_m711::_c_data_settings_3[80][16] = {
uint8_t mouse_m711::_c_data_settings_3[90][16] = {
{0x02, 0xf3, 0x42, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xb2, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
@ -231,43 +215,53 @@ uint8_t mouse_m711::_c_data_settings_3[80][16] = {
{0x02, 0xf3, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x86, 0x00, 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x8a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x9a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x90, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x9e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x90, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x92, 0x00, 0x04, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xd2, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xd6, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x8e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x92, 0x00, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x96, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x9a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x9e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x9b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xaa, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xae, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x42, 0x01, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x46, 0x01, 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x4a, 0x01, 0x04, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x5a, 0x01, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x5e, 0x01, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x52, 0x01, 0x04, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x92, 0x01, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x96, 0x01, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x4e, 0x01, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x52, 0x01, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x56, 0x01, 0x04, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x5a, 0x01, 0x04, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x5e, 0x01, 0x04, 0x00, 0x00, 0x00, 0x9b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x6a, 0x01, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x6e, 0x01, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xf2, 0x01, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xf6, 0x01, 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xfa, 0x01, 0x04, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x0a, 0x02, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x0e, 0x02, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x42, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x46, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xfe, 0x01, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x06, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x0a, 0x02, 0x04, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x0e, 0x02, 0x04, 0x00, 0x00, 0x00, 0x9b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x1a, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x1e, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xa2, 0x02, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xa6, 0x02, 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xaa, 0x02, 0x04, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xba, 0x02, 0x04, 0x00, 0x00, 0x00, 0x90, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xbe, 0x02, 0x04, 0x00, 0x00, 0x00, 0x90, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xb2, 0x02, 0x04, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xf2, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xf6, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xae, 0x02, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xb2, 0x02, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xb6, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xba, 0x02, 0x04, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xbe, 0x02, 0x04, 0x00, 0x00, 0x00, 0x9b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xca, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xce, 0x02, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x52, 0x03, 0x04, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x56, 0x03, 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x5a, 0x03, 0x04, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x6a, 0x03, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x6e, 0x03, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x62, 0x03, 0x04, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xa2, 0x03, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0xa6, 0x03, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x5e, 0x03, 0x04, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x62, 0x03, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x66, 0x03, 0x04, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x6a, 0x03, 0x04, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x6e, 0x03, 0x04, 0x00, 0x00, 0x00, 0x9b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x7a, 0x03, 0x04, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf3, 0x7e, 0x03, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf1, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf1, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x02, 0xf1, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},

View file

@ -280,7 +280,7 @@ class mouse_m711 : public rd_mouse{
std::array<uint8_t, 5> _s_speed_levels;
std::array<std::array<bool, 5>, 5> _s_dpi_enabled;
std::array<std::array<std::array<uint8_t, 4>, 5>, 5> _s_dpi_levels;
std::array<std::array<std::array<uint8_t, 4>, 8>, 5> _s_keymap_data;
std::array<std::array<std::array<uint8_t, 4>, 10>, 5> _s_keymap_data;
std::array<rd_report_rate, 5> _s_report_rates;
std::array<std::array<uint8_t, 256>, 15> _s_macro_data;
std::array<uint8_t, 15> _s_macro_repeat;
@ -293,7 +293,7 @@ class mouse_m711 : public rd_mouse{
/// Used for sending the settings, part 2/3
static uint8_t _c_data_settings_2[64];
/// Used for sending the settings, part 3/3
static uint8_t _c_data_settings_3[80][16];
static uint8_t _c_data_settings_3[90][16];
/// Used for sending a macro, part 1/3
static uint8_t _c_data_macros_1[16];
/// Used for sending a macro, part 2/3

View file

@ -62,8 +62,7 @@ int mouse_m711::write_settings(){
// end
//modify buffers to include settings
// Currently no data capture available
//scrollspeed
for( int i = 0; i < 5; i++ ){
buffer2[8+(2*i)] = _s_scrollspeeds[i];
@ -92,7 +91,6 @@ int mouse_m711::write_settings(){
buffer1[3+(2*i)][12] = _s_speed_levels[i];
}
// Currently no data capture available
//dpi
for( int i = 0; i < 5; i++ ){
for( int j = 0; j < 5; j++ ){
@ -109,12 +107,11 @@ int mouse_m711::write_settings(){
//key mapping
for( int i = 0; i < 5; i++ ){
for( int j = 0; j < 8; j++ ){
buffer3[35+(8*i)+j][8] = _s_keymap_data[i][j][0];
buffer3[35+(8*i)+j][9] = _s_keymap_data[i][j][1];
buffer3[35+(8*i)+j][10] = _s_keymap_data[i][j][2];
buffer3[35+(8*i)+j][11] = _s_keymap_data[i][j][3];
//std::cout << (int)_s_keymap_data[i][j][0] << " " << (int)_s_keymap_data[i][j][1] << " " << (int)_s_keymap_data[i][j][2] << " " << (int)_s_keymap_data[i][j][3] << "\n";
for( int j = 0; j < 10; j++ ){
buffer3[35+(10*i)+j][8] = _s_keymap_data[i][j][0];
buffer3[35+(10*i)+j][9] = _s_keymap_data[i][j][1];
buffer3[35+(10*i)+j][10] = _s_keymap_data[i][j][2];
buffer3[35+(10*i)+j][11] = _s_keymap_data[i][j][3];
}
}
@ -130,7 +127,6 @@ int mouse_m711::write_settings(){
libusb_control_transfer( _i_handle, 0x21, 0x09, 0x0302, 0x0002, buffer1[i], 16, 1000 );
}
// Currently no data capture available
//send data 2
libusb_control_transfer( _i_handle, 0x21, 0x09, 0x0302, 0x0002, buffer2, 64, 1000 );