Show model in -R output
This commit is contained in:
parent
3e42722a4c
commit
5a254b9e17
2 changed files with 13 additions and 11 deletions
|
@ -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)<br>- Nothing is tested<br>- Implemented: led color, mode, brightness and speed, changing profiles, macros, reading settings<br>- No usb capture available, therefore missing: button mapping, dpi, scrollspeed, usb poll rate
|
||||
Redragon M715 Dagger | experimental | 0x04d9:0xfc39 | Nothing is tested<br>- 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)<br>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<br>- 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)
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue