diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c index c982082..d13a4f0 100644 --- a/src/config.c +++ b/src/config.c @@ -30,6 +30,7 @@ #define CAM_ELEVATION_DEADZONE 3.0f #define MAX_CAM_ELEVATION 5.0f +#define CAM_AZIMUTH_STEP 0.01 #define MAX_ABSOLOUTE_SENSORS_OUTPUT_VALUE 1.0f #define FINAL_SENSOR_MULTIPLIER 1.0f @@ -46,6 +47,7 @@ #define MAX_BEZEL_VALUE 1.0f #define MAX_BUTTON_VALUE 1.0f #define MAX_ELEVATION_VALUE 0.0f +#define BUTTON_MULTIPLIER 1.0f void config_set_sensor_steering_bezel_velocity() { @@ -56,7 +58,8 @@ void config_set_sensor_steering_bezel_velocity() model_sensors_set_acceleration_sensor_params(MAX_DIRECTION, MAX_ABSOLOUTE_SENSORS_OUTPUT_VALUE, DIRECTION_DEADZONE, FINAL_SENSOR_MULTIPLIER, false, 0, 0); model_sensors_set_gravity_sensor_params(MAX_GRAVITY, MAX_INCREMENTAL_OUTPUT_VALUE, INCREMENTAL_MODE_GRAVITY_DEADZONE, FINAL_SENSOR_MULTIPLIER, true, -MAX_INCREMENTAL_VALUE, MAX_INCREMENTAL_VALUE); //camera - view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_BUTTON_VALUE); + view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_BUTTON_VALUE, CAM_AZIMUTH_STEP); + view_racing_set_direction_indicator_multiplier(BUTTON_MULTIPLIER); } void config_set_bezel_steering_sensor_velocity() @@ -68,10 +71,11 @@ void config_set_bezel_steering_sensor_velocity() model_sensors_set_acceleration_sensor_params(MAX_DIRECTION, MAX_INCREMENTAL_OUTPUT_VALUE, INCREMENTAL_MODE_ACC_DEADZONE, -FINAL_SENSOR_MULTIPLIER, true, -MAX_INCREMENTAL_VALUE, MAX_INCREMENTAL_VALUE); //camera model_sensors_set_gravity_sensor_params(MAX_GRAVITY, MAX_ABSOLOUTE_SENSORS_OUTPUT_VALUE, GRAVITY_DEADZONE, FINAL_SENSOR_MULTIPLIER, false, 0.0f, 0.0f); - view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_ELEVATION_VALUE); + view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_ELEVATION_VALUE, -CAM_AZIMUTH_STEP); + view_racing_set_direction_indicator_multiplier(-BUTTON_MULTIPLIER); } -void config_set_sensor_stering_sensor_velocity() +void config_set_sensor_stering_sensor_velocity_bezel_elev() { model_device_to_connection_set_control_roles(STERING_MODE_DIRETION, STERING_MODE_THROTTLE, STERING_MODE_CAM_ELEVATION, STERING_MODE_CAM_AZIMUTH); model_hw_set_bezel_params(BEZEL_SLOW_STEP, BEZEL_DEADZONE, false, 0, false); @@ -80,5 +84,19 @@ void config_set_sensor_stering_sensor_velocity() model_sensors_set_acceleration_sensor_params(MAX_DIRECTION, MAX_ABSOLOUTE_SENSORS_OUTPUT_VALUE, DIRECTION_DEADZONE, FINAL_SENSOR_MULTIPLIER, false, 0.0f, 0.0f); model_sensors_set_gravity_sensor_params(MAX_GRAVITY, MAX_ABSOLOUTE_SENSORS_OUTPUT_VALUE, GRAVITY_DEADZONE, FINAL_SENSOR_MULTIPLIER, false, 0.0f, 0.0f); - view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_BUTTON_VALUE); + view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_BUTTON_VALUE, CAM_AZIMUTH_STEP); + view_racing_set_direction_indicator_multiplier(BUTTON_MULTIPLIER); +} + +void config_set_sensor_stering_sensor_velocity_bezel_azimuth() +{ + model_device_to_connection_set_control_roles(STERING_MODE_DIRETION, STERING_MODE_THROTTLE, STERING_MODE_CAM_AZIMUTH, STERING_MODE_CAM_ELEVATION); + model_hw_set_bezel_params(BEZEL_SLOW_STEP, BEZEL_DEADZONE, false, 0, false); + model_hw_set_bezel_max_min(-MAX_BEZEL_VALUE, MAX_BEZEL_VALUE); + + model_sensors_set_acceleration_sensor_params(MAX_DIRECTION, MAX_ABSOLOUTE_SENSORS_OUTPUT_VALUE, DIRECTION_DEADZONE, FINAL_SENSOR_MULTIPLIER, false, 0.0f, 0.0f); + model_sensors_set_gravity_sensor_params(MAX_GRAVITY, 1.0f, GRAVITY_DEADZONE, 1.0f, false, 0.0f, 0.0f); + + view_racing_set_button_params(-MAX_BUTTON_VALUE, MAX_ELEVATION_VALUE, -CAM_AZIMUTH_STEP); + view_racing_set_direction_indicator_multiplier(BUTTON_MULTIPLIER); } |