Unverified Commit d4b1d240 authored by Darren Lines's avatar Darren Lines Committed by GitHub
Browse files

Merge pull request #16 from iNavFlight/master

Merge from master
parents 1336cc2b e81b26c9
......@@ -184,11 +184,19 @@ helper.defaultsDialog = (function() {
]
},
{
"title": 'Airplane',
"title": 'Airplane with a Tail',
"notRecommended": false,
"id": 3,
"reboot": true,
"settings": [
{
key: "platform_type",
value: "AIRPLANE"
},
{
key: "applied_defaults",
value: 3
},
{
key: "gyro_hardware_lpf",
value: "256HZ"
......@@ -197,6 +205,10 @@ helper.defaultsDialog = (function() {
key: "gyro_lpf_hz",
value: 25
},
{
key: "dterm_lpf_hz",
value: 40
},
{
key: "gyro_lpf_type",
value: "BIQUAD"
......@@ -217,6 +229,10 @@ helper.defaultsDialog = (function() {
key: "motor_pwm_protocol",
value: "STANDARD"
},
{
key: "throttle_idle",
value: 5.0
},
{
key: "rc_yaw_expo",
value: 30
......@@ -227,15 +243,83 @@ helper.defaultsDialog = (function() {
},
{
key: "roll_rate",
value: 20
value: 18
},
{
key: "pitch_rate",
value: 15
value: 9
},
{
key: "yaw_rate",
value: 9
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: 5
},
{
key: "fw_ff_yaw",
value: 100
},
{
key: "imu_acc_ignore_rate",
value: 10
},
{
key: "airmode_type",
value: "STICK_CENTER_ONCE"
},
{
key: "small_angle",
......@@ -255,36 +339,190 @@ helper.defaultsDialog = (function() {
},
{
key: "failsafe_mission",
value: "OFF"
value: "ON"
},
{
key: "nav_wp_radius",
value: 3000
value: 1500
},
],
"features":[
{
bit: 4, // Enable MOTOR_STOP
state: true
}
]
},
{
"title": 'Airplane without a Tail (Wing, Delta, etc)',
"notRecommended": false,
"id": 3,
"reboot": true,
"settings": [
{
key: "platform_type",
value: "AIRPLANE"
},
{
{
key: "applied_defaults",
value: 3
},
{
key: "gyro_hardware_lpf",
value: "256HZ"
},
{
key: "gyro_lpf_hz",
value: 25
},
{
key: "dterm_lpf_hz",
value: 40
},
{
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: 5
},
{
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
},
],
"features":[
{
bit: 4, // Enable MOTOR_STOP
state: true
}
]
},
},
{
"title": 'Rovers & Boats',
"notRecommended": false,
......
......@@ -71,7 +71,7 @@ var FC = {
return (MIXER_CONFIG.platformType == PLATFORM_AIRPLANE || MIXER_CONFIG.platformType == PLATFORM_ROVER || MIXER_CONFIG.platformType == PLATFORM_BOAT) || ((MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) && semver.gte(CONFIG.flightControllerVersion, "2.6.0"));
},
isRpyDComponentUsed: function () {
return MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER;
return true; // Currently all platforms use D term
},
isCdComponentUsed: function () {
return FC.isRpyDComponentUsed();
......@@ -1112,6 +1112,11 @@ var FC = {
hasOperand: [true, true],
output: "raw"
},
40: {
name: "MOD",
hasOperand: [true, true],
output: "raw"
},
18: {
name: "GVAR SET",
hasOperand: [true, true],
......@@ -1216,7 +1221,7 @@ var FC = {
name: "RC CHANNEL OVERRIDE",
hasOperand: [true, true],
output: "boolean"
}
},
}
},
getOperandTypes: function () {
......
......@@ -1157,489 +1157,336 @@ presets.presets = [
],
type: 'multirotor'
},
{
name: "Generic Airplane",
description: "General setup for airplanes.",
features: [
"Adjusted gyro filtering",
"Adjusted PIDs",
"Adjusted rates"
],
{
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: "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
}
],
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: "applied_defaults",
value: 3
},
{
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: "dterm_lpf_hz",
value: 40
},
{
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",
},
{
key: "motor_pwm_protocol",
value: "STANDARD"
},
{
key: "throttle_idle",
value: 5.0
},
{
key: "rc_yaw_expo",
value: 30
},
{