diff --git a/README.md b/README.md index 2b63e40..8acd9de 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Redragon M709 Tiger | experimental | 0x04d9:0xfc2a | See [this issue](https://gi Redragon M711 Cobra (FPS) | experimental | 0x04d9:0xfc30 | See [this issue](https://github.com/dokutan/mouse_m908/issues/2)
- Nothing is tested
- Implemented: led color, mode, brightness and speed, changing profiles, macros, reading settings
- No usb capture available, therefore missing: button mapping, dpi, scrollspeed, usb poll rate Redragon M715 Dagger | experimental | 0x04d9:0xfc39 | Nothing is tested
- The device specific code is copied from the M711 and mostly unmodified Redragon M990 Legend | experimental | 0x04d9:0xfc0f | See [this issue](https://github.com/dokutan/mouse_m908/issues/5)
This mouse uses a different data format, keycodes, etc. -Redragon M990 Legend (RGB/Chroma) | experimental | 0x04d9:0xfc41 | [please read this](#generic-support) +Redragon M990 Legend (RGB/Chroma) | experimental | 0x04d9:0xfc41 | - Changing the profile works
- Reading the settings works partially Redragon M719 Invader | generic | 0x04d9:0xfc4f | [please read this](#generic-support) Redragon M802 Titanoboa 2 | generic | 0x04d9:0xfc42 | [please read this](#generic-support) Redragon 2858 (?) | generic | 0x04d9:0xfc5e | [please read this](#generic-support) diff --git a/mouse_m908.cpp b/mouse_m908.cpp index a801da9..9e0d1fe 100644 --- a/mouse_m908.cpp +++ b/mouse_m908.cpp @@ -51,7 +51,7 @@ bool flag_bus, bool flag_device, bool flag_kernel_driver, bool flag_dump_settings, bool flag_read_settings, std::string string_config, std::string string_profile, std::string string_macro, std::string string_number, std::string string_bus, std::string string_device, -std::string string_dump, std::string string_read, uint16_t vid, uint16_t pid ); +std::string string_dump, std::string string_read, uint16_t vid, uint16_t pid, std::string model ); @@ -195,7 +195,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else if( string_model == "709" ){ @@ -205,7 +205,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else if( string_model == "711" ){ @@ -215,7 +215,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else if( string_model == "715" ){ @@ -225,7 +225,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else if( string_model == "990" ){ @@ -235,7 +235,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else if( string_model == "990chroma" ){ @@ -245,7 +245,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else if( string_model == "generic" ){ @@ -255,7 +255,7 @@ int main( int argc, char **argv ){ flag_dump_settings, flag_read_settings, string_config, string_profile, string_macro, string_number, string_bus, string_device, - string_dump, string_read, vid, pid ); + string_dump, string_read, vid, pid, string_model ); }else{ @@ -289,7 +289,7 @@ bool flag_bus, bool flag_device, bool flag_kernel_driver, bool flag_dump_settings, bool flag_read_settings, std::string string_config, std::string string_profile, std::string string_macro, std::string string_number, std::string string_bus, std::string string_device, -std::string string_dump, std::string string_read, uint16_t vid, uint16_t pid ){ +std::string string_dump, std::string string_read, uint16_t vid, uint16_t pid, std::string model ){ // create mouse object T m; @@ -333,7 +333,8 @@ std::string string_dump, std::string string_read, uint16_t vid, uint16_t pid ){ if( string_read != "-" ){ std::ofstream out( string_read ); - if( out.is_open() ){ + if( out.is_open() ){ + out << "# Model: " << model << "\n"; // read settings m.read_and_print_settings( out ); @@ -342,6 +343,7 @@ std::string string_dump, std::string string_read, uint16_t vid, uint16_t pid ){ throw std::string( "Couldn't open "+string_read ); } } else{ + std::cout << "# Model: " << model << "\n"; m.read_and_print_settings( std::cout ); }