From 6450bee328d14fe571aac8898dc4a87d6e562893 Mon Sep 17 00:00:00 2001 From: dokutan <54861821+dokutan@users.noreply.github.com> Date: Sun, 4 Apr 2021 16:52:05 +0200 Subject: [PATCH] Update write_settings() for the M719 --- include/m719/data.cpp | 135 ++++++++++++++++++-------------------- include/m719/mouse_m719.h | 2 +- include/m719/writers.cpp | 25 ++----- 3 files changed, 71 insertions(+), 91 deletions(-) diff --git a/include/m719/data.cpp b/include/m719/data.cpp index 1ad79fa..a00e03e 100644 --- a/include/m719/data.cpp +++ b/include/m719/data.cpp @@ -51,43 +51,26 @@ uint8_t mouse_m719::_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_m719::_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 +// used for changing the settings, part 1/3 uint8_t mouse_m719::_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}, {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, 0x02, 0x08, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x4f, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x51, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x02, 0x08, 0x00, 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, 0x02, 0x08, 0x00, 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, 0x02, 0x08, 0x00, 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, 0x02, 0x08, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x6f, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x32, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x38, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 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, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x51, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x08, 0x01, 0x00, 0x00}, + {0x02, 0xf3, 0x57, 0x04, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x59, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x08, 0x01, 0x00, 0x00}, + {0x02, 0xf3, 0x5f, 0x04, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x61, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x08, 0x01, 0x00, 0x00}, + {0x02, 0xf3, 0x67, 0x04, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x69, 0x04, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x08, 0x01, 0x00, 0x00}, + {0x02, 0xf3, 0x6f, 0x04, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x32, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x38, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} }; -// Currently not used, no capture available +// used for changing the settings, part 2/3 uint8_t mouse_m719::_c_data_settings_2[64] = { 0x03, 0xf3, 0x20, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -95,83 +78,93 @@ uint8_t mouse_m719::_c_data_settings_2[64] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -// Currently not used, no capture available -uint8_t mouse_m719::_c_data_settings_3[80][16] = { - {0x02, 0xf3, 0x42, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, +// used for changing the settings, part 3/3 +uint8_t mouse_m719::_c_data_settings_3[90][16] = { + {0x02, 0xf3, 0x42, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 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}, {0x02, 0xf3, 0x62, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf3, 0x12, 0x03, 0x02, 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}, {0x02, 0xf1, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x44, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0xb4, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x64, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x14, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x4a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x44, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0xb4, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x64, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x14, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x4a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf3, 0x0a, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0xba, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0xba, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf3, 0x6a, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x1a, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x1a, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf3, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0xc0, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x70, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0xc0, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x70, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf3, 0x20, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x56, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x16, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0xc6, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x76, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x26, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x5c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x1c, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0xcc, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x7c, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x02, 0xf3, 0x2c, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x56, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x16, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0xc6, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x76, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x26, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x5c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x1c, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0xcc, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x7c, 0x02, 0x04, 0x00, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x2c, 0x03, 0x04, 0x00, 0x00, 0x00, 0x01, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf1, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x02, 0xf3, 0x2c, 0x00, 0x02, 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, 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, 0x96, 0x00, 0x04, 0x00, 0x00, 0x00, 0x99, 0x81, 0x03, 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, 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, 0x9a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x9b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0xf3, 0x9e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x84, 0x00, 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, 0x56, 0x01, 0x04, 0x00, 0x00, 0x00, 0x99, 0x81, 0x03, 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, 0x88, 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, 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, 0x06, 0x02, 0x04, 0x00, 0x00, 0x00, 0x99, 0x81, 0x03, 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, 0x88, 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, 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, 0xb6, 0x02, 0x04, 0x00, 0x00, 0x00, 0x99, 0x81, 0x03, 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, 0x88, 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, 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, 0x66, 0x03, 0x04, 0x00, 0x00, 0x00, 0x99, 0x81, 0x03, 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, 0x88, 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, 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}, diff --git a/include/m719/mouse_m719.h b/include/m719/mouse_m719.h index fcc9bcf..8af1a0c 100644 --- a/include/m719/mouse_m719.h +++ b/include/m719/mouse_m719.h @@ -290,7 +290,7 @@ class mouse_m719 : 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 diff --git a/include/m719/writers.cpp b/include/m719/writers.cpp index e37613d..fdbb844 100644 --- a/include/m719/writers.cpp +++ b/include/m719/writers.cpp @@ -48,7 +48,6 @@ int mouse_m719::write_settings(){ std::copy(std::begin(_c_data_settings_1[i]), std::end(_c_data_settings_1[i]), std::begin(buffer1[i])); } - // Currently no data capture available //prepare data 2 uint8_t buffer2[64]; std::copy(std::begin(_c_data_settings_2), std::end(_c_data_settings_2), std::begin(buffer2)); @@ -59,17 +58,12 @@ int mouse_m719::write_settings(){ for( int i = 0; i < rows3; i++ ){ std::copy(std::begin(_c_data_settings_3[i]), std::end(_c_data_settings_3[i]), std::begin(buffer3[i])); } - // 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]; } - // end - //lightmode for( int i = 0; i < 5; i++ ){ std::array lightmode_bytes = {0x01, 0x02}; // default value is lightmode_static, only relevent in case of an error @@ -91,8 +85,6 @@ int mouse_m719::write_settings(){ for( int i = 0; i < 5; i++ ){ 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++ ){ @@ -101,31 +93,27 @@ int mouse_m719::write_settings(){ buffer3[7+(5*i)+j][10] = _s_dpi_levels[j][i][1]; } } - //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]; } } - //usb report rate for( int i = 0; i < 3; i++ ) buffer1[13][8+(2*i)] = _i_encode_report_rate(_s_report_rates[i]); for( int i = 3; i < 5; i++ ) buffer1[14][2+(2*i)] = _i_encode_report_rate(_s_report_rates[i]); - // end + //send data 1 for( int i = 0; i < rows1; i++ ){ 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 ); @@ -133,7 +121,6 @@ int mouse_m719::write_settings(){ for( int i = 0; i < rows3; i++ ){ libusb_control_transfer( _i_handle, 0x21, 0x09, 0x0302, 0x0002, buffer3[i], 16, 1000 ); } - // end return 0; }