From 9a4fbffa5d2153008d3edcf6f6f711dece8ad5e0 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Mon, 1 Mar 2021 22:44:39 +0100 Subject: [PATCH 01/13] Adding 2 Airplane Options and new defaults Added Airplane with tail and Flying Wing with no tail as options and new defaults for safer initial setup and flights, that avoid problems with big airplanes and wingspans. --- js/defaults_dialog.js | 328 +++++++++++++++++++++++++++++++----------- 1 file changed, 244 insertions(+), 84 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index d58f866a..b08ea488 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -184,99 +184,259 @@ helper.defaultsDialog = (function() { ] }, { - "title": 'Airplane', + "title": 'Airplane with Tail', "notRecommended": false, "id": 3, "reboot": true, "settings": [ - { + { + key: "platform_type" + value: "AIRPLANE" + }, + { key: "gyro_hardware_lpf", value: "256HZ" }, + { + key: "gyro_lpf_hz" + value: "25" + }, + { + key: "gyro_lpf_type" + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled" + value: "ON" + }, + { + key: "dynamic_gyro_notch_q" + value: "250" + }, + { + key: "dynamic_gyro_notch_min_hz" + value: "30" + }, + { + key: "motor_pwm_protocol" + value: "STANDARD" + }, + { + key: "rc_yaw_expo" + value: "30" + }, + { + key: "rc_expo" + value: "30" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate" + value: "9" + }, + { + key: "yaw_rate" + value: "3" + }, + { + key: "nav_fw_pos_z_p" + value: "20" + }, + { + key: "nav_fw_pos_z_d" + value: "5" + }, + { + key: "nav_fw_pos_xy_p" + value: "50" + }, + { + key: "small_angle" + value: "180" + }, + { + key: "nav_rth_allow_landing" + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude" + value: "5000" + }, + { + key: "nav_wp_radius" + value: "1500" + }, + { + key: "throttle_idle" + value: "5.000" + }, + { + key: "applied_defaults" + value: "3" + }, + { + key: "imu_acc_ignore_rate" + value: "10" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "nav_rth_climb_first" + value: "OFF" + }, + { + key: "fw_turn_assist_pitch_gain" + value: "0.5" + }, + { + key: "max_angle_inclination_rll" + value: "35" + }, + { + key: "nav_fw_bank_angle" + value: "35" + }, + + ], + "features":[ { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "motor_pwm_protocol", - value: "STANDARD" - }, - { - key: "rc_yaw_expo", - value: 30 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "roll_rate", - value: 20 - }, - { - key: "pitch_rate", - value: 15 - }, - { - key: "yaw_rate", - value: 9 - }, - { - key: "small_angle", - value: 180 - }, - { - key: "nav_fw_control_smoothness", - value: 2 - }, - { - key: "nav_rth_allow_landing", - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude", - value: 5000 - }, - { - key: "failsafe_mission", - value: "OFF" - }, - { - key: "nav_wp_radius", - value: 3000 - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "applied_defaults", - value: 3 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - }, - { - key: "airmode_type", - value: "STICK_CENTER_ONCE" + bit: 4, // Enable MOTOR_STOP + state: true } + ] + }, + { + "title": 'Flying Wing with no Tail', + "notRecommended": false, + "id": 3, + "reboot": true, + "settings": [ + { + key: "platform_type" + value: "AIRPLANE" + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz" + value: "25" + }, + { + key: "gyro_lpf_type" + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled" + value: "ON" + }, + { + key: "dynamic_gyro_notch_q" + value: "250" + }, + { + key: "dynamic_gyro_notch_min_hz" + value: "30" + }, + { + key: "motor_pwm_protocol" + value: "STANDARD" + }, + { + key: "rc_yaw_expo" + value: "30" + }, + { + key: "rc_expo" + value: "30" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate" + value: "9" + }, + { + key: "yaw_rate" + value: "3" + }, + { + key: "nav_fw_pos_z_p" + value: "20" + }, + { + key: "nav_fw_pos_z_d" + value: "5" + }, + { + key: "nav_fw_pos_xy_p" + value: "50" + }, + { + key: "small_angle" + value: "180" + }, + { + key: "nav_rth_allow_landing" + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude" + value: "5000" + }, + { + key: "nav_wp_radius" + value: "1500" + }, + { + key: "throttle_idle" + value: "5.000" + }, + { + key: "applied_defaults" + value: "3" + }, + { + key: "imu_acc_ignore_rate" + value: "10" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "nav_rth_climb_first" + value: "OFF" + }, + { + key: "fw_turn_assist_pitch_gain" + value: "0.2" + }, + { + key: "max_angle_inclination_rll" + value: "45" + }, + { + key: "nav_fw_bank_angle" + value: "45" + }, + ], "features":[ { From 350cfda82d57c4671fd3544e17c968d787a16404 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Mon, 1 Mar 2021 22:49:40 +0100 Subject: [PATCH 02/13] change box size 2 fit extra default preset --- src/css/defaults_dialog.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/css/defaults_dialog.css b/src/css/defaults_dialog.css index 13bc4c8e..0f50cb1d 100644 --- a/src/css/defaults_dialog.css +++ b/src/css/defaults_dialog.css @@ -15,7 +15,7 @@ z-index: 2002; position: absolute; width: 500px; - height: 450px; + height: 485px; overflow-y: auto; top: 0; bottom: 0; @@ -54,4 +54,4 @@ .defaults_btn--not-recommended a:hover { color: #222 !important; -} \ No newline at end of file +} From 38f36946a23b0c421a13ecf5ad0c0762815e40ec Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Tue, 2 Mar 2021 18:10:35 +0100 Subject: [PATCH 03/13] Final settings with Plane + Wing Preset in intial popup Testing of the preset settings is ongoing. Will make PR when confirmed working over all plane ranges --- js/defaults_dialog.js | 546 ++++++++++++++++++++++++------------------ 1 file changed, 316 insertions(+), 230 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index b08ea488..749437e5 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -190,122 +190,165 @@ helper.defaultsDialog = (function() { "reboot": true, "settings": [ { - key: "platform_type" - value: "AIRPLANE" - }, - { - key: "gyro_hardware_lpf", - value: "256HZ" + key: "platform_type" + value: "AIRPLANE" + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" }, { - key: "gyro_lpf_hz" - value: "25" - }, - { - key: "gyro_lpf_type" - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled" - value: "ON" - }, - { - key: "dynamic_gyro_notch_q" - value: "250" - }, - { - key: "dynamic_gyro_notch_min_hz" - value: "30" - }, - { - key: "motor_pwm_protocol" - value: "STANDARD" - }, - { - key: "rc_yaw_expo" - value: "30" - }, - { - key: "rc_expo" - value: "30" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate" - value: "9" - }, - { - key: "yaw_rate" - value: "3" - }, - { - key: "nav_fw_pos_z_p" - value: "20" - }, - { - key: "nav_fw_pos_z_d" - value: "5" - }, - { - key: "nav_fw_pos_xy_p" - value: "50" - }, - { - key: "small_angle" - value: "180" - }, - { - key: "nav_rth_allow_landing" - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude" - value: "5000" - }, - { - key: "nav_wp_radius" - value: "1500" - }, - { - key: "throttle_idle" - value: "5.000" - }, - { - key: "applied_defaults" - value: "3" - }, - { - key: "imu_acc_ignore_rate" - value: "10" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "nav_rth_climb_first" - value: "OFF" - }, - { - key: "fw_turn_assist_pitch_gain" - value: "0.5" - }, - { - key: "max_angle_inclination_rll" - value: "35" - }, - { - key: "nav_fw_bank_angle" - value: "35" - }, - + key: "gyro_lpf_hz" + value: "25" + }, + { + key: "gyro_lpf_type" + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled" + value: "ON" + }, + { + key: "dynamic_gyro_notch_q" + value: "250" + }, + { + key: "dynamic_gyro_notch_min_hz" + value: "30" + }, + { + key: "motor_pwm_protocol" + value: "STANDARD" + }, + { + key: "rc_yaw_expo" + value: "30" + }, + { + key: "rc_expo" + value: "30" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate" + value: "9" + }, + { + key: "yaw_rate" + value: "3" + }, + { + key: "nav_fw_pos_z_p" + value: "20" + }, + { + key: "nav_fw_pos_z_d" + value: "5" + }, + { + key: "nav_fw_pos_xy_p" + value: "50" + }, + { + key: "small_angle" + value: "180" + }, + { + key: "nav_rth_allow_landing" + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude" + value: "5000" + }, + { + key: "nav_wp_radius" + value: "1500" + }, + { + key: "throttle_idle" + value: "5.000" + }, + { + key: "applied_defaults" + value: "3" + }, + { + key: "imu_acc_ignore_rate" + value: "10" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "nav_rth_climb_first" + value: "OFF" + }, + { + key: "fw_turn_assist_pitch_gain" + value: "0.5" + }, + { + key: "max_angle_inclination_rll" + value: "35" + }, + { + key: "nav_fw_bank_angle" + value: "35" + }, + { + key: "fw_p_pitch" + value: "15" + }, + { + key: "fw_i_pitch" + value: "10" + }, + { + key: "fw_ff_pitch" + value: "60" + }, + { + key: "fw_p_roll" + value: "10" + }, + { + key: "fw_i_roll" + value: "8" + }, + { + key: "fw_ff_roll" + value: "40" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate + value: "9" + }, + { + key: "fw_p_yaw" + value: "20" + }, + { + key: "fw_i_yaw" + value: "0" + }, + { + key: "fw_ff_yaw" + value: "100" + }, ], "features":[ { @@ -314,129 +357,172 @@ helper.defaultsDialog = (function() { } ] }, - { - "title": 'Flying Wing with no Tail', + { + "title": 'Flying Wing, Delta, etc.', "notRecommended": false, "id": 3, "reboot": true, "settings": [ { - key: "platform_type" - value: "AIRPLANE" - }, - { - key: "gyro_hardware_lpf", - value: "256HZ" + key: "platform_type" + value: "AIRPLANE" + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" }, { - key: "gyro_lpf_hz" - value: "25" - }, - { - key: "gyro_lpf_type" - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled" - value: "ON" - }, - { - key: "dynamic_gyro_notch_q" - value: "250" - }, - { - key: "dynamic_gyro_notch_min_hz" - value: "30" - }, - { - key: "motor_pwm_protocol" - value: "STANDARD" - }, - { - key: "rc_yaw_expo" - value: "30" - }, - { - key: "rc_expo" - value: "30" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate" - value: "9" - }, - { - key: "yaw_rate" - value: "3" - }, - { - key: "nav_fw_pos_z_p" - value: "20" - }, - { - key: "nav_fw_pos_z_d" - value: "5" - }, - { - key: "nav_fw_pos_xy_p" - value: "50" - }, - { - key: "small_angle" - value: "180" - }, - { - key: "nav_rth_allow_landing" - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude" - value: "5000" - }, - { - key: "nav_wp_radius" - value: "1500" - }, - { - key: "throttle_idle" - value: "5.000" - }, - { - key: "applied_defaults" - value: "3" - }, - { - key: "imu_acc_ignore_rate" - value: "10" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "nav_rth_climb_first" - value: "OFF" - }, - { - key: "fw_turn_assist_pitch_gain" - value: "0.2" - }, - { - key: "max_angle_inclination_rll" - value: "45" - }, - { - key: "nav_fw_bank_angle" - value: "45" - }, - + key: "gyro_lpf_hz" + value: "25" + }, + { + key: "gyro_lpf_type" + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled" + value: "ON" + }, + { + key: "dynamic_gyro_notch_q" + value: "250" + }, + { + key: "dynamic_gyro_notch_min_hz" + value: "30" + }, + { + key: "motor_pwm_protocol" + value: "STANDARD" + }, + { + key: "rc_yaw_expo" + value: "30" + }, + { + key: "rc_expo" + value: "30" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate" + value: "9" + }, + { + key: "yaw_rate" + value: "3" + }, + { + key: "nav_fw_pos_z_p" + value: "20" + }, + { + key: "nav_fw_pos_z_d" + value: "5" + }, + { + key: "nav_fw_pos_xy_p" + value: "50" + }, + { + key: "small_angle" + value: "180" + }, + { + key: "nav_rth_allow_landing" + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude" + value: "5000" + }, + { + key: "nav_wp_radius" + value: "1500" + }, + { + key: "throttle_idle" + value: "5.000" + }, + { + key: "applied_defaults" + value: "3" + }, + { + key: "imu_acc_ignore_rate" + value: "10" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "nav_rth_climb_first" + value: "OFF" + }, + { + key: "fw_turn_assist_pitch_gain" + value: "0.2" + }, + { + key: "max_angle_inclination_rll" + value: "45" + }, + { + key: "nav_fw_bank_angle" + value: "45" + }, + { + key: "fw_p_pitch" + value: "10" + }, + { + key: "fw_i_pitch" + value: "15" + }, + { + key: "fw_ff_pitch" + value: "70" + }, + { + key: "fw_p_roll" + value: "5" + }, + { + key: "fw_i_roll" + value: "8" + }, + { + key: "fw_ff_roll" + value: "35" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate + value: "9" + }, + { + key: "fw_p_yaw" + value: "20" + }, + { + key: "fw_i_yaw" + value: "0" + }, + { + key: "fw_ff_yaw" + value: "100" + }, ], "features":[ { From b382f224a052c568cb415d91659310e8bddfbc54 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Tue, 2 Mar 2021 18:29:50 +0100 Subject: [PATCH 04/13] Update preset_definitions.js Removed specific airplane Presets. Added Generic Presets for Wings and planes. --- js/preset_definitions.js | 786 ++++++++++++++++----------------------- 1 file changed, 328 insertions(+), 458 deletions(-) diff --git a/js/preset_definitions.js b/js/preset_definitions.js index 2253b8a5..810b3d6c 100644 --- a/js/preset_definitions.js +++ b/js/preset_definitions.js @@ -1159,11 +1159,12 @@ presets.presets = [ }, { name: "Generic Airplane", - description: "General setup for airplanes.", + description: "General setup for airplanes with Tails and Elevator.", features: [ "Adjusted gyro filtering", - "Adjusted PIDs", - "Adjusted rates" + "Adjusted PIFFs", + "Adjusted rates", + "Navigation PIDs" ], applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], settingsMSP: [ @@ -1174,472 +1175,341 @@ presets.presets = [ ], settings: [ { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "manual_rc_expo", - value: 30 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - } + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz" + value: "25" + }, + { + key: "gyro_lpf_type" + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled" + value: "ON" + }, + { + key: "dynamic_gyro_notch_q" + value: "250" + }, + { + key: "dynamic_gyro_notch_min_hz" + value: "30" + }, + { + key: "motor_pwm_protocol" + value: "STANDARD" + }, + { + key: "rc_yaw_expo" + value: "30" + }, + { + key: "rc_expo" + value: "30" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate" + value: "9" + }, + { + key: "yaw_rate" + value: "3" + }, + { + key: "nav_fw_pos_z_p" + value: "20" + }, + { + key: "nav_fw_pos_z_d" + value: "5" + }, + { + key: "nav_fw_pos_xy_p" + value: "50" + }, + { + key: "small_angle" + value: "180" + }, + { + key: "nav_rth_allow_landing" + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude" + value: "5000" + }, + { + key: "nav_wp_radius" + value: "1500" + }, + { + key: "throttle_idle" + value: "5.000" + }, + { + key: "applied_defaults" + value: "3" + }, + { + key: "imu_acc_ignore_rate" + value: "10" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "nav_rth_climb_first" + value: "OFF" + }, + { + key: "fw_turn_assist_pitch_gain" + value: "0.5" + }, + { + key: "max_angle_inclination_rll" + value: "35" + }, + { + key: "nav_fw_bank_angle" + value: "35" + }, + { + key: "fw_p_pitch" + value: "15" + }, + { + key: "fw_i_pitch" + value: "10" + }, + { + key: "fw_ff_pitch" + value: "60" + }, + { + key: "fw_p_roll" + value: "10" + }, + { + key: "fw_i_roll" + value: "8" + }, + { + key: "fw_ff_roll" + value: "40" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate + value: "9" + }, + { + key: "fw_p_yaw" + value: "20" + }, + { + key: "fw_i_yaw" + value: "0" + }, + { + key: "fw_ff_yaw" + value: "100" + }, + ], ], type: 'airplane' }, - { - name: "Flying Wing Z84", - description: "Small flying wing on multirotor racer parts. 3S/4S battery, AUW under 500g.", - features: [ - "Adjusted gyro filtering", - "Adjusted PIDs", - "Adjusted rates" - ], - applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], - settingsMSP: [ - presets.elementHelper("RC_tuning", "roll_rate", 350), - presets.elementHelper("RC_tuning", "pitch_rate", 90), - presets.elementHelper("RC_tuning", "dynamic_THR_PID", 33), - presets.elementHelper("RC_tuning", "dynamic_THR_breakpoint", 1300), - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 4) - ], - settings: [ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "fw_p_pitch", - value: 2 - }, - { - key: "fw_i_pitch", - value: 15 - }, - { - key: "fw_ff_pitch", - value: 70 - }, - { - key: "fw_p_roll", - value: 2 - }, - { - key: "fw_i_roll", - value: 15 - }, - { - key: "fw_ff_roll", - value: 30 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "manual_rc_expo", - value: 30 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - } - ], - type: 'flyingwing' - }, - { - name: "Flying Wing S800 Sky Shadow", - description: "Flying wing on multirotor racer parts. 3S/4S battery and FPV equipment. AUW under 1000g.", - features: [ - "Adjusted gyro filtering", - "Adjusted PIDs", - "Adjusted rates" - ], - applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], - settingsMSP: [ - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 0), - presets.elementHelper("FILTER_CONFIG", "gyroSoftLpfHz", 40), - presets.elementHelper("RC_tuning", "roll_rate", 280), - presets.elementHelper("RC_tuning", "pitch_rate", 140), - presets.elementHelper("RC_tuning", "dynamic_THR_PID", 20), - presets.elementHelper("RC_tuning", "dynamic_THR_breakpoint", 1600) - ], - settings: [ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "fw_p_pitch", - value: 6 - }, - { - key: "fw_i_pitch", - value: 9 - }, - { - key: "fw_ff_pitch", - value: 52 - }, - { - key: "fw_p_roll", - value: 6 - }, - { - key: "fw_i_roll", - value: 6 - }, - { - key: "fw_ff_roll", - value: 49 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "manual_rc_expo", - value: 30 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - } - ], - type: 'flyingwing' - }, - { - name: "Ritewing Mini Drak", - description: "8x6 propeller, 2216 1400kV motor, 4S LiPo. AUW above 1200g.", - features: [ - "Adjusted gyro filtering", - "Adjusted PIDs", - "Adjusted rates" - ], - applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], - settingsMSP: [ - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 0), - presets.elementHelper("FILTER_CONFIG", "gyroSoftLpfHz", 35), - presets.elementHelper("RC_tuning", "roll_rate", 260), - presets.elementHelper("RC_tuning", "pitch_rate", 140), - presets.elementHelper("RC_tuning", "dynamic_THR_PID", 30), - presets.elementHelper("RC_tuning", "dynamic_THR_breakpoint", 1550) - ], - settings: [ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "fw_p_pitch", - value: 5 - }, - { - key: "fw_i_pitch", - value: 14 - }, - { - key: "fw_ff_pitch", - value: 56 - }, - { - key: "fw_p_roll", - value: 7 - }, - { - key: "fw_i_roll", - value: 12 - }, - { - key: "fw_ff_roll", - value: 25 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "manual_rc_expo", - value: 30 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - } - ], - type: 'flyingwing' - }, - { - name: "ZOHD Dart 250g", - description: "3x5x3 propeller, 1406 2600kV motor, 3S LiPo. 570mm wingspan, AUW potentially under 250g on 2S.

Please set the Stabilised Roll weight to 80, and the Stabilised Pitch weight to 65.", + { + name: "Flying Wing, Delta, etc.", + description: "General setup for airplanes with Tails and Elevator.", features: [ "Adjusted gyro filtering", - "Adjusted PIDs", - "Adjusted rates" + "Adjusted PIFFs", + "Adjusted rates", + "Navigation PIDs" ], applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], settingsMSP: [ - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 3), - presets.elementHelper("FILTER_CONFIG", "gyroSoftLpfHz", 30), - presets.elementHelper("RC_tuning", "roll_rate", 360), - presets.elementHelper("RC_tuning", "pitch_rate", 130), - presets.elementHelper("RC_tuning", "dynamic_THR_PID", 30), - presets.elementHelper("RC_tuning", "dynamic_THR_breakpoint", 1500) + presets.elementHelper("RC_tuning", "roll_rate", 200), + presets.elementHelper("RC_tuning", "pitch_rate", 150), + presets.elementHelper("RC_tuning", "yaw_rate", 90), + presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 1) ], settings: [ { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "fw_p_pitch", - value: 3 - }, - { - key: "fw_i_pitch", - value: 7 - }, - { - key: "fw_ff_pitch", - value: 40 - }, - { - key: "fw_p_roll", - value: 2 - }, - { - key: "fw_i_roll", - value: 4 - }, - { - key: "fw_ff_roll", - value: 18 - }, - { - key: "rc_expo", - value: 70 - }, - { - key: "manual_rc_expo", - value: 70 - }, - { - key: "rc_yaw_expo", - value: 20 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - } + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz" + value: "25" + }, + { + key: "gyro_lpf_type" + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled" + value: "ON" + }, + { + key: "dynamic_gyro_notch_q" + value: "250" + }, + { + key: "dynamic_gyro_notch_min_hz" + value: "30" + }, + { + key: "motor_pwm_protocol" + value: "STANDARD" + }, + { + key: "rc_yaw_expo" + value: "30" + }, + { + key: "rc_expo" + value: "30" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate" + value: "9" + }, + { + key: "yaw_rate" + value: "3" + }, + { + key: "nav_fw_pos_z_p" + value: "20" + }, + { + key: "nav_fw_pos_z_d" + value: "5" + }, + { + key: "nav_fw_pos_xy_p" + value: "50" + }, + { + key: "small_angle" + value: "180" + }, + { + key: "nav_rth_allow_landing" + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude" + value: "5000" + }, + { + key: "nav_wp_radius" + value: "1500" + }, + { + key: "throttle_idle" + value: "5.000" + }, + { + key: "applied_defaults" + value: "3" + }, + { + key: "imu_acc_ignore_rate" + value: "10" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "airmode_type" + value: "STICK_CENTER_ONCE" + }, + { + key: "nav_rth_climb_first" + value: "OFF" + }, + { + key: "fw_turn_assist_pitch_gain" + value: "0.2" + }, + { + key: "max_angle_inclination_rll" + value: "45" + }, + { + key: "nav_fw_bank_angle" + value: "45" + }, + { + key: "fw_p_pitch" + value: "10" + }, + { + key: "fw_i_pitch" + value: "15" + }, + { + key: "fw_ff_pitch" + value: "70" + }, + { + key: "fw_p_roll" + value: "5" + }, + { + key: "fw_i_roll" + value: "8" + }, + { + key: "fw_ff_roll" + value: "35" + }, + { + key: "roll_rate" + value: "18" + }, + { + key: "pitch_rate + value: "9" + }, + { + key: "fw_p_yaw" + value: "20" + }, + { + key: "fw_i_yaw" + value: "0" + }, + { + key: "fw_ff_yaw" + value: "100" + }, + ], ], - type: 'flyingwing' + type: 'airplane' }, - { - name: "SonicModell Mini AR Wing", - description: "5x4.5 propeller, 1805 2400kV motor, 3S LiPo. 600mm wingspan, AUW under 400g.", - features: [ - "Adjusted gyro filtering", - "Adjusted PIDs", - "Adjusted rates" - ], - applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], - settingsMSP: [ - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 0), - presets.elementHelper("FILTER_CONFIG", "gyroSoftLpfHz", 35), - presets.elementHelper("RC_tuning", "roll_rate", 280), - presets.elementHelper("RC_tuning", "pitch_rate", 120) - ], - settings: [ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz", - value: 25 - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "gyro_lpf_type", - value: "BIQUAD" - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "fw_p_pitch", - value: 5 - }, - { - key: "fw_i_pitch", - value: 18 - }, - { - key: "fw_ff_pitch", - value: 60 - }, - { - key: "fw_p_roll", - value: 8 - }, - { - key: "fw_i_roll", - value: 16 - }, - { - key: "fw_ff_roll", - value: 64 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "manual_rc_expo", - value: 30 - }, - { - key: "imu_acc_ignore_rate", - value: 10 - } - ], - type: 'flyingwing' - } + ]; From 50dc9a0badd7d3a9da0ccc8d5c83b5ee22beb6ba Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:04:29 +0100 Subject: [PATCH 05/13] Fixed some values and script errors --- js/defaults_dialog.js | 496 ++++++++++++++++++++---------------------- 1 file changed, 240 insertions(+), 256 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 749437e5..2239d3e9 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -184,171 +184,163 @@ helper.defaultsDialog = (function() { ] }, { - "title": 'Airplane with Tail', + "title": 'Airplane with a Tail', "notRecommended": false, "id": 3, "reboot": true, "settings": [ - { - key: "platform_type" - value: "AIRPLANE" - }, { - key: "gyro_hardware_lpf", - value: "256HZ" + key: "platform_type", + value: "AIRPLANE" + }, + { + key: "applied_defaults", + value: 3 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz", + value: 25 + }, + { + key: "gyro_lpf_type", + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 30 + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" }, - { - key: "gyro_lpf_hz" - value: "25" - }, - { - key: "gyro_lpf_type" - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled" - value: "ON" - }, - { - key: "dynamic_gyro_notch_q" - value: "250" - }, - { - key: "dynamic_gyro_notch_min_hz" - value: "30" - }, - { - key: "motor_pwm_protocol" - value: "STANDARD" - }, - { - key: "rc_yaw_expo" - value: "30" - }, - { - key: "rc_expo" - value: "30" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate" - value: "9" - }, - { - key: "yaw_rate" - value: "3" - }, - { - key: "nav_fw_pos_z_p" - value: "20" - }, - { - key: "nav_fw_pos_z_d" - value: "5" - }, - { - key: "nav_fw_pos_xy_p" - value: "50" - }, - { - key: "small_angle" - value: "180" - }, - { - key: "nav_rth_allow_landing" - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude" - value: "5000" - }, - { - key: "nav_wp_radius" - value: "1500" - }, - { - key: "throttle_idle" - value: "5.000" - }, - { - key: "applied_defaults" - value: "3" - }, - { - key: "imu_acc_ignore_rate" - value: "10" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, { - key: "airmode_type" - value: "STICK_CENTER_ONCE" + key: "throttle_idle", + value: 5.0 }, + { + key: "rc_yaw_expo", + value: 30 + }, + { + key: "rc_expo", + value: 30 + }, + { + key: "roll_rate", + value: 18 + }, + { + key: "pitch_rate", + value: 9 + }, + { + key: "yaw_rate", + value: 3 + }, { - key: "nav_rth_climb_first" - value: "OFF" + key: "nav_fw_pos_z_p", + value: 20 }, { - key: "fw_turn_assist_pitch_gain" - value: "0.5" + key: "nav_fw_pos_z_d", + value: 5 }, { - key: "max_angle_inclination_rll" - value: "35" + key: "nav_fw_pos_xy_p", + value: 50 }, { - key: "nav_fw_bank_angle" - value: "35" + key: "fw_turn_assist_pitch_gain", + value: 0.5 }, { - key: "fw_p_pitch" - value: "15" + key: "max_angle_inclination_rll", + value: 350 }, { - key: "fw_i_pitch" - value: "10" + key: "nav_fw_bank_angle", + value: 35 }, { - key: "fw_ff_pitch" - value: "60" + key: "fw_p_pitch", + value: 15 }, { - key: "fw_p_roll" - value: "10" + key: "fw_i_pitch", + value: 10 }, { - key: "fw_i_roll" - value: "8" + key: "fw_ff_pitch", + value: 60 }, { - key: "fw_ff_roll" - value: "40" + key: "fw_p_roll", + value: 10 }, { - key: "roll_rate" - value: "18" + key: "fw_i_roll", + value: 8 }, { - key: "pitch_rate - value: "9" + key: "fw_ff_roll", + value: 40 }, { - key: "fw_p_yaw" - value: "20" + key: "fw_p_yaw", + value: 20 }, { - key: "fw_i_yaw" - value: "0" + key: "fw_i_yaw", + value: 0 }, { - key: "fw_ff_yaw" - value: "100" + key: "fw_ff_yaw", + value: 100 }, + { + key: "imu_acc_ignore_rate", + value: 10 + }, + { + key: "airmode_type", + value: "STICK_CENTER_ONCE" + }, + { + key: "small_angle", + value: 180 + }, + { + key: "nav_fw_control_smoothness", + value: 2 + }, + { + key: "nav_rth_allow_landing", + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude", + value: 5000 + }, + { + key: "failsafe_mission", + value: "OFF" + }, + { + key: "nav_wp_radius", + value: 1500 + }, ], "features":[ { @@ -358,179 +350,171 @@ helper.defaultsDialog = (function() { ] }, { - "title": 'Flying Wing, Delta, etc.', + "title": 'Airplane without a Tail (Wing, Delta, etc)', "notRecommended": false, "id": 3, "reboot": true, "settings": [ - { - key: "platform_type" - value: "AIRPLANE" - }, { - key: "gyro_hardware_lpf", - value: "256HZ" + key: "platform_type", + value: "AIRPLANE" + }, + { + key: "applied_defaults", + value: 3 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz", + value: 25 + }, + { + key: "gyro_lpf_type", + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 30 + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" }, - { - key: "gyro_lpf_hz" - value: "25" - }, - { - key: "gyro_lpf_type" - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled" - value: "ON" - }, - { - key: "dynamic_gyro_notch_q" - value: "250" - }, - { - key: "dynamic_gyro_notch_min_hz" - value: "30" - }, - { - key: "motor_pwm_protocol" - value: "STANDARD" - }, - { - key: "rc_yaw_expo" - value: "30" - }, - { - key: "rc_expo" - value: "30" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate" - value: "9" - }, - { - key: "yaw_rate" - value: "3" - }, - { - key: "nav_fw_pos_z_p" - value: "20" - }, - { - key: "nav_fw_pos_z_d" - value: "5" - }, - { - key: "nav_fw_pos_xy_p" - value: "50" - }, - { - key: "small_angle" - value: "180" - }, - { - key: "nav_rth_allow_landing" - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude" - value: "5000" - }, - { - key: "nav_wp_radius" - value: "1500" - }, - { - key: "throttle_idle" - value: "5.000" - }, - { - key: "applied_defaults" - value: "3" - }, - { - key: "imu_acc_ignore_rate" - value: "10" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, { - key: "airmode_type" - value: "STICK_CENTER_ONCE" + key: "throttle_idle", + value: 5.0 }, + { + key: "rc_yaw_expo", + value: 30 + }, + { + key: "rc_expo", + value: 30 + }, + { + key: "roll_rate", + value: 18 + }, + { + key: "pitch_rate", + value: 9 + }, + { + key: "yaw_rate", + value: 3 + }, { - key: "nav_rth_climb_first" - value: "OFF" + key: "nav_fw_pos_z_p", + value: 20 }, { - key: "fw_turn_assist_pitch_gain" - value: "0.2" + key: "nav_fw_pos_z_d", + value: 5 }, { - key: "max_angle_inclination_rll" - value: "45" + key: "nav_fw_pos_xy_p", + value: 50 }, { - key: "nav_fw_bank_angle" - value: "45" + key: "fw_turn_assist_pitch_gain", + value: 0.2 }, { - key: "fw_p_pitch" - value: "10" + key: "max_angle_inclination_rll", + value: 450 }, { - key: "fw_i_pitch" - value: "15" + key: "nav_fw_bank_angle", + value: 45 }, { - key: "fw_ff_pitch" - value: "70" + key: "fw_p_pitch", + value: 10 }, { - key: "fw_p_roll" - value: "5" + key: "fw_i_pitch", + value: 15 }, { - key: "fw_i_roll" - value: "8" + key: "fw_ff_pitch", + value: 70 }, { - key: "fw_ff_roll" - value: "35" + key: "fw_p_roll", + value: 5 }, { - key: "roll_rate" - value: "18" + key: "fw_i_roll", + value: 8 }, { - key: "pitch_rate - value: "9" + key: "fw_ff_roll", + value: 35 }, { - key: "fw_p_yaw" - value: "20" + key: "fw_p_yaw", + value: 20 }, { - key: "fw_i_yaw" - value: "0" + key: "fw_i_yaw", + value: 0 }, { - key: "fw_ff_yaw" - value: "100" + key: "fw_ff_yaw", + value: 100 }, - ], + { + key: "imu_acc_ignore_rate", + value: 10 + }, + { + key: "airmode_type", + value: "STICK_CENTER_ONCE" + }, + { + key: "small_angle", + value: 180 + }, + { + key: "nav_fw_control_smoothness", + value: 2 + }, + { + key: "nav_rth_allow_landing", + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude", + value: 5000 + }, + { + key: "failsafe_mission", + value: "OFF" + }, + { + key: "nav_wp_radius", + value: 1500 + }, + ], "features":[ { bit: 4, // Enable MOTOR_STOP state: true } ] - }, + }, { "title": 'Rovers & Boats', "notRecommended": false, From 3d54609cd09f6424a1ca25a66b6a4287e0c034fe Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:18:29 +0100 Subject: [PATCH 06/13] Corrected code layout and fixed some settings --- js/preset_definitions.js | 667 +++++++++++++++++++-------------------- 1 file changed, 318 insertions(+), 349 deletions(-) diff --git a/js/preset_definitions.js b/js/preset_definitions.js index 810b3d6c..d752289c 100644 --- a/js/preset_definitions.js +++ b/js/preset_definitions.js @@ -1157,359 +1157,328 @@ presets.presets = [ ], type: 'multirotor' }, - { - name: "Generic Airplane", - description: "General setup for airplanes with Tails and Elevator.", - features: [ - "Adjusted gyro filtering", - "Adjusted PIFFs", - "Adjusted rates", - "Navigation PIDs" - ], + { + name: 'Airplane with a tail', + description: "General setup for airplanes with tails.", + features: ["Adjusted gyro filtering", "Adjusted PIDs", "Adjusted rates"], applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], - settingsMSP: [ - presets.elementHelper("RC_tuning", "roll_rate", 200), - presets.elementHelper("RC_tuning", "pitch_rate", 150), - presets.elementHelper("RC_tuning", "yaw_rate", 90), - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 1) - ], + settingsMSP: [], + type: 'airplane', settings: [ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz" - value: "25" - }, - { - key: "gyro_lpf_type" - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled" - value: "ON" - }, - { - key: "dynamic_gyro_notch_q" - value: "250" - }, - { - key: "dynamic_gyro_notch_min_hz" - value: "30" - }, - { - key: "motor_pwm_protocol" - value: "STANDARD" - }, - { - key: "rc_yaw_expo" - value: "30" - }, - { - key: "rc_expo" - value: "30" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate" - value: "9" - }, - { - key: "yaw_rate" - value: "3" - }, - { - key: "nav_fw_pos_z_p" - value: "20" - }, - { - key: "nav_fw_pos_z_d" - value: "5" - }, - { - key: "nav_fw_pos_xy_p" - value: "50" - }, - { - key: "small_angle" - value: "180" - }, - { - key: "nav_rth_allow_landing" - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude" - value: "5000" - }, - { - key: "nav_wp_radius" - value: "1500" - }, - { - key: "throttle_idle" - value: "5.000" - }, - { - key: "applied_defaults" - value: "3" - }, - { - key: "imu_acc_ignore_rate" - value: "10" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "nav_rth_climb_first" - value: "OFF" - }, - { - key: "fw_turn_assist_pitch_gain" - value: "0.5" - }, - { - key: "max_angle_inclination_rll" - value: "35" - }, - { - key: "nav_fw_bank_angle" - value: "35" - }, - { - key: "fw_p_pitch" - value: "15" - }, - { - key: "fw_i_pitch" - value: "10" - }, - { - key: "fw_ff_pitch" - value: "60" - }, - { - key: "fw_p_roll" - value: "10" - }, - { - key: "fw_i_roll" - value: "8" - }, - { - key: "fw_ff_roll" - value: "40" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate - value: "9" - }, - { - key: "fw_p_yaw" - value: "20" - }, - { - key: "fw_i_yaw" - value: "0" - }, - { - key: "fw_ff_yaw" - value: "100" - }, - ], - ], - type: 'airplane' - }, { - name: "Flying Wing, Delta, etc.", - description: "General setup for airplanes with Tails and Elevator.", - features: [ - "Adjusted gyro filtering", - "Adjusted PIFFs", - "Adjusted rates", - "Navigation PIDs" - ], + key: "platform_type", + value: "AIRPLANE" + }, + { + key: "applied_defaults", + value: 3 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz", + value: 25 + }, + { + key: "gyro_lpf_type", + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 30 + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" + }, + { + key: "throttle_idle", + value: 5.0 + }, + { + key: "rc_yaw_expo", + value: 30 + }, + { + key: "rc_expo", + value: 30 + }, + { + key: "roll_rate", + value: 18 + }, + { + key: "pitch_rate", + value: 9 + }, + { + key: "yaw_rate", + value: 3 + }, + { + key: "nav_fw_pos_z_p", + value: 20 + }, + { + key: "nav_fw_pos_z_d", + value: 5 + }, + { + key: "nav_fw_pos_xy_p", + value: 50 + }, + { + key: "fw_turn_assist_pitch_gain", + value: 0.5 + }, + { + key: "max_angle_inclination_rll", + value: 350 + }, + { + key: "nav_fw_bank_angle", + value: 35 + }, + { + key: "fw_p_pitch", + value: 15 + }, + { + key: "fw_i_pitch", + value: 10 + }, + { + key: "fw_ff_pitch", + value: 60 + }, + { + key: "fw_p_roll", + value: 10 + }, + { + key: "fw_i_roll", + value: 8 + }, + { + key: "fw_ff_roll", + value: 40 + }, + { + key: "fw_p_yaw", + value: 20 + }, + { + key: "fw_i_yaw", + value: 0 + }, + { + key: "fw_ff_yaw", + value: 100 + }, + { + key: "imu_acc_ignore_rate", + value: 10 + }, + { + key: "airmode_type", + value: "STICK_CENTER_ONCE" + }, + { + key: "small_angle", + value: 180 + }, + { + key: "nav_fw_control_smoothness", + value: 2 + }, + { + key: "nav_rth_allow_landing", + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude", + value: 5000 + }, + { + key: "failsafe_mission", + value: "ON" + }, + { + key: "nav_wp_radius", + value: 1500 + }, + ], + }, + { + name: "Airplane without tail", + description: "General setup for airplanes without tails: Flying Wing, Delta, etc.", + features: ["Adjusted gyro filtering", "Adjusted PIDs", "Adjusted rates"], applyDefaults: ["INAV_PID_CONFIG", "RC_tuning", "PID_ADVANCED", "FILTER_CONFIG"], - settingsMSP: [ - presets.elementHelper("RC_tuning", "roll_rate", 200), - presets.elementHelper("RC_tuning", "pitch_rate", 150), - presets.elementHelper("RC_tuning", "yaw_rate", 90), - presets.elementHelper("INAV_PID_CONFIG", "gyroscopeLpf", 1) - ], + settingsMSP: [], + type: 'flyingwing', settings: [ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_lpf_hz" - value: "25" - }, - { - key: "gyro_lpf_type" - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled" - value: "ON" - }, - { - key: "dynamic_gyro_notch_q" - value: "250" - }, - { - key: "dynamic_gyro_notch_min_hz" - value: "30" - }, - { - key: "motor_pwm_protocol" - value: "STANDARD" - }, - { - key: "rc_yaw_expo" - value: "30" - }, - { - key: "rc_expo" - value: "30" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate" - value: "9" - }, - { - key: "yaw_rate" - value: "3" - }, - { - key: "nav_fw_pos_z_p" - value: "20" - }, - { - key: "nav_fw_pos_z_d" - value: "5" - }, - { - key: "nav_fw_pos_xy_p" - value: "50" - }, - { - key: "small_angle" - value: "180" - }, - { - key: "nav_rth_allow_landing" - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude" - value: "5000" - }, - { - key: "nav_wp_radius" - value: "1500" - }, - { - key: "throttle_idle" - value: "5.000" - }, - { - key: "applied_defaults" - value: "3" - }, - { - key: "imu_acc_ignore_rate" - value: "10" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "airmode_type" - value: "STICK_CENTER_ONCE" - }, - { - key: "nav_rth_climb_first" - value: "OFF" - }, - { - key: "fw_turn_assist_pitch_gain" - value: "0.2" - }, - { - key: "max_angle_inclination_rll" - value: "45" - }, - { - key: "nav_fw_bank_angle" - value: "45" - }, - { - key: "fw_p_pitch" - value: "10" - }, - { - key: "fw_i_pitch" - value: "15" - }, - { - key: "fw_ff_pitch" - value: "70" - }, - { - key: "fw_p_roll" - value: "5" - }, - { - key: "fw_i_roll" - value: "8" - }, - { - key: "fw_ff_roll" - value: "35" - }, - { - key: "roll_rate" - value: "18" - }, - { - key: "pitch_rate - value: "9" - }, - { - key: "fw_p_yaw" - value: "20" - }, - { - key: "fw_i_yaw" - value: "0" - }, - { - key: "fw_ff_yaw" - value: "100" - }, - ], - ], - type: 'airplane' + { + key: "platform_type", + value: "AIRPLANE" + }, + { + key: "applied_defaults", + value: 3 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_lpf_hz", + value: 25 + }, + { + key: "gyro_lpf_type", + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 30 + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" + }, + { + key: "throttle_idle", + value: 5.0 + }, + { + key: "rc_yaw_expo", + value: 30 + }, + { + key: "rc_expo", + value: 30 + }, + { + key: "roll_rate", + value: 18 + }, + { + key: "pitch_rate", + value: 9 + }, + { + key: "yaw_rate", + value: 3 + }, + { + key: "nav_fw_pos_z_p", + value: 20 + }, + { + key: "nav_fw_pos_z_d", + value: 5 + }, + { + key: "nav_fw_pos_xy_p", + value: 50 + }, + { + key: "fw_turn_assist_pitch_gain", + value: 0.2 + }, + { + key: "max_angle_inclination_rll", + value: 450 + }, + { + key: "nav_fw_bank_angle", + value: 45 + }, + { + key: "fw_p_pitch", + value: 10 + }, + { + key: "fw_i_pitch", + value: 15 + }, + { + key: "fw_ff_pitch", + value: 70 + }, + { + key: "fw_p_roll", + value: 5 + }, + { + key: "fw_i_roll", + value: 8 + }, + { + key: "fw_ff_roll", + value: 35 + }, + { + key: "fw_p_yaw", + value: 20 + }, + { + key: "fw_i_yaw", + value: 0 + }, + { + key: "fw_ff_yaw", + value: 100 + }, + { + key: "imu_acc_ignore_rate", + value: 10 + }, + { + key: "airmode_type", + value: "STICK_CENTER_ONCE" + }, + { + key: "small_angle", + value: 180 + }, + { + key: "nav_fw_control_smoothness", + value: 2 + }, + { + key: "nav_rth_allow_landing", + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude", + value: 5000 + }, + { + key: "failsafe_mission", + value: "ON" + }, + { + key: "nav_wp_radius", + value: 1500 + }, + ], }, - ]; From daf6f875ffb2ae3ac5654d727f4960e2accd4e58 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:19:09 +0100 Subject: [PATCH 07/13] Update defaults_dialog.js --- js/defaults_dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 2239d3e9..3c404a64 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -335,7 +335,7 @@ helper.defaultsDialog = (function() { }, { key: "failsafe_mission", - value: "OFF" + value: "ON" }, { key: "nav_wp_radius", @@ -501,7 +501,7 @@ helper.defaultsDialog = (function() { }, { key: "failsafe_mission", - value: "OFF" + value: "ON" }, { key: "nav_wp_radius", From 404b1ec04fb16e9144319664aacd2676100d6145 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:58:12 +0100 Subject: [PATCH 08/13] Update defaults_dialog.css --- src/css/defaults_dialog.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/defaults_dialog.css b/src/css/defaults_dialog.css index 0f50cb1d..1091427d 100644 --- a/src/css/defaults_dialog.css +++ b/src/css/defaults_dialog.css @@ -16,7 +16,7 @@ position: absolute; width: 500px; height: 485px; - overflow-y: auto; + overflow-y: none; top: 0; bottom: 0; left: 0; From acafd68969a0626411a96c98b96e5174d21b4c11 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 5 Mar 2021 08:48:20 +0100 Subject: [PATCH 09/13] Update defaults_dialog.css --- src/css/defaults_dialog.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/defaults_dialog.css b/src/css/defaults_dialog.css index 1091427d..9ec599a7 100644 --- a/src/css/defaults_dialog.css +++ b/src/css/defaults_dialog.css @@ -16,7 +16,7 @@ position: absolute; width: 500px; height: 485px; - overflow-y: none; + overflow: none; top: 0; bottom: 0; left: 0; From 737bfca3927670b2935522165185ae5c7a97482a Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 5 Mar 2021 21:24:56 +0100 Subject: [PATCH 10/13] added some yaw I gain to assist trim --- js/defaults_dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 3c404a64..bbb5387c 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -303,7 +303,7 @@ helper.defaultsDialog = (function() { }, { key: "fw_i_yaw", - value: 0 + value: 5 }, { key: "fw_ff_yaw", @@ -469,7 +469,7 @@ helper.defaultsDialog = (function() { }, { key: "fw_i_yaw", - value: 0 + value: 5 }, { key: "fw_ff_yaw", From f6ca21b4e89bfe499a55c43ca7747e12b69be3c8 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 5 Mar 2021 21:25:35 +0100 Subject: [PATCH 11/13] added some yaw I gain to assist trimming --- js/preset_definitions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/preset_definitions.js b/js/preset_definitions.js index d752289c..f6290de4 100644 --- a/js/preset_definitions.js +++ b/js/preset_definitions.js @@ -1279,7 +1279,7 @@ presets.presets = [ }, { key: "fw_i_yaw", - value: 0 + value: 5 }, { key: "fw_ff_yaw", @@ -1441,7 +1441,7 @@ presets.presets = [ }, { key: "fw_i_yaw", - value: 0 + value: 5 }, { key: "fw_ff_yaw", From 41a16946480b3acd37f013d5c3163cdb23d40860 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Mon, 8 Mar 2021 13:21:54 +0100 Subject: [PATCH 12/13] added fw_dterm_lpf --- js/defaults_dialog.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index bbb5387c..d6595c6c 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -205,6 +205,10 @@ helper.defaultsDialog = (function() { key: "gyro_lpf_hz", value: 25 }, + { + key: "dterm_lpf_hz", + value: 10 + }, { key: "gyro_lpf_type", value: "BIQUAD" @@ -371,6 +375,10 @@ helper.defaultsDialog = (function() { key: "gyro_lpf_hz", value: 25 }, + { + key: "dterm_lpf_hz", + value: 10 + }, { key: "gyro_lpf_type", value: "BIQUAD" From 22a53d1fabc35fcc4ad4d3eff561c8422f00791f Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Mon, 8 Mar 2021 13:23:06 +0100 Subject: [PATCH 13/13] added dterm_lpf_hz for fixed wing --- js/preset_definitions.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/preset_definitions.js b/js/preset_definitions.js index f6290de4..43729a46 100644 --- a/js/preset_definitions.js +++ b/js/preset_definitions.js @@ -1181,6 +1181,10 @@ presets.presets = [ key: "gyro_lpf_hz", value: 25 }, + { + key: "dterm_lpf_hz", + value: 10 + }, { key: "gyro_lpf_type", value: "BIQUAD" @@ -1341,8 +1345,12 @@ presets.presets = [ }, { key: "gyro_lpf_hz", - value: 25 + value: 25 }, + { + key: "dterm_lpf_hz", + value: 10 + }, { key: "gyro_lpf_type", value: "BIQUAD"