Ability to disable IMU
This commit is contained in:
parent
f4f638ea24
commit
1866d65b9e
6 changed files with 17 additions and 3 deletions
|
|
@ -25,6 +25,7 @@ int main(int argc, char ** argv) {
|
||||||
.enable_thermal_profiles_switching = false,
|
.enable_thermal_profiles_switching = false,
|
||||||
.default_thermal_profile = -1,
|
.default_thermal_profile = -1,
|
||||||
.enable_leds_commands = false,
|
.enable_leds_commands = false,
|
||||||
|
.enable_imu = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
load_in_config(&in_settings, configuration_file);
|
load_in_config(&in_settings, configuration_file);
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,5 @@ dualsense_edge = false;
|
||||||
swap_y_z = true;
|
swap_y_z = true;
|
||||||
enable_thermal_profiles_switching = true;
|
enable_thermal_profiles_switching = true;
|
||||||
default_thermal_profile = -1;
|
default_thermal_profile = -1;
|
||||||
enable_leds_commands = true;
|
enable_leds_commands = true;
|
||||||
|
enable_imu = true;
|
||||||
1
main.c
1
main.c
|
|
@ -24,6 +24,7 @@ int main(int argc, char ** argv) {
|
||||||
.enable_thermal_profiles_switching = false,
|
.enable_thermal_profiles_switching = false,
|
||||||
.default_thermal_profile = -1,
|
.default_thermal_profile = -1,
|
||||||
.enable_leds_commands = false,
|
.enable_leds_commands = false,
|
||||||
|
.enable_imu = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
load_in_config(&in_settings, configuration_file);
|
load_in_config(&in_settings, configuration_file);
|
||||||
|
|
|
||||||
|
|
@ -1516,19 +1516,22 @@ input_dev_t timer_dev = {
|
||||||
input_dev_composite_t rc71l_composite = {
|
input_dev_composite_t rc71l_composite = {
|
||||||
.dev = {
|
.dev = {
|
||||||
&in_xbox_dev,
|
&in_xbox_dev,
|
||||||
&in_iio_dev,
|
|
||||||
&in_asus_kb_1_dev,
|
&in_asus_kb_1_dev,
|
||||||
&in_asus_kb_2_dev,
|
&in_asus_kb_2_dev,
|
||||||
&in_asus_kb_3_dev,
|
&in_asus_kb_3_dev,
|
||||||
&timer_dev,
|
&timer_dev,
|
||||||
},
|
},
|
||||||
.dev_count = 6,
|
.dev_count = 5,
|
||||||
.init_fn = rc71l_platform_init,
|
.init_fn = rc71l_platform_init,
|
||||||
.deinit_fn = rc71l_platform_deinit,
|
.deinit_fn = rc71l_platform_deinit,
|
||||||
.leds_fn = rc71l_platform_leds,
|
.leds_fn = rc71l_platform_leds,
|
||||||
};
|
};
|
||||||
|
|
||||||
input_dev_composite_t* rog_ally_device_def(const dev_in_settings_t *const conf) {
|
input_dev_composite_t* rog_ally_device_def(const dev_in_settings_t *const conf) {
|
||||||
|
if (conf->enable_imu) {
|
||||||
|
rc71l_composite.dev[rc71l_composite.dev_count++] = &in_iio_dev;
|
||||||
|
}
|
||||||
|
|
||||||
if (conf->touchbar) {
|
if (conf->touchbar) {
|
||||||
rc71l_composite.dev[rc71l_composite.dev_count++] = &in_touchscreen_dev;
|
rc71l_composite.dev[rc71l_composite.dev_count++] = &in_touchscreen_dev;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,13 @@ void load_in_config(dev_in_settings_t *const out_conf, const char* const filepat
|
||||||
fprintf(stderr, "enable_leds_commands (bool) configuration not found. Default value will be used.\n");
|
fprintf(stderr, "enable_leds_commands (bool) configuration not found. Default value will be used.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int enable_imu;
|
||||||
|
if (config_lookup_bool(&cfg, "enable_imu", &enable_imu) != CONFIG_FALSE) {
|
||||||
|
out_conf->enable_imu = enable_imu;
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "enable_imu (bool) configuration not found. Default value will be used.\n");
|
||||||
|
}
|
||||||
|
|
||||||
config_destroy(&cfg);
|
config_destroy(&cfg);
|
||||||
|
|
||||||
load_in_config_err:
|
load_in_config_err:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ typedef struct dev_in_settings {
|
||||||
bool enable_thermal_profiles_switching;
|
bool enable_thermal_profiles_switching;
|
||||||
int default_thermal_profile;
|
int default_thermal_profile;
|
||||||
bool enable_leds_commands;
|
bool enable_leds_commands;
|
||||||
|
bool enable_imu;
|
||||||
} dev_in_settings_t;
|
} dev_in_settings_t;
|
||||||
|
|
||||||
void load_in_config(dev_in_settings_t *const out_conf, const char* const filepath);
|
void load_in_config(dev_in_settings_t *const out_conf, const char* const filepath);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue