mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 01:35:23 +03:00
updated FW Presets
This commit is contained in:
parent
ffce2c9a57
commit
374c9cad9e
2 changed files with 794 additions and 802 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
var helper = helper || {};
|
||||
|
||||
helper.defaultsDialog = (function() {
|
||||
helper.defaultsDialog = (function () {
|
||||
|
||||
let publicScope = {},
|
||||
privateScope = {};
|
||||
|
@ -203,7 +203,7 @@ helper.defaultsDialog = (function() {
|
|||
},
|
||||
{
|
||||
key: "dterm_lpf_hz",
|
||||
value: 40
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
key: "d_boost_factor",
|
||||
|
@ -263,7 +263,7 @@ helper.defaultsDialog = (function() {
|
|||
},
|
||||
{
|
||||
key: "nav_fw_pos_xy_p",
|
||||
value: 50
|
||||
value: 60
|
||||
},
|
||||
{
|
||||
key: "fw_turn_assist_pitch_gain",
|
||||
|
@ -287,7 +287,7 @@ helper.defaultsDialog = (function() {
|
|||
},
|
||||
{
|
||||
key: "fw_ff_pitch",
|
||||
value: 60
|
||||
value: 80
|
||||
},
|
||||
{
|
||||
key: "fw_p_roll",
|
||||
|
@ -315,7 +315,11 @@ helper.defaultsDialog = (function() {
|
|||
},
|
||||
{
|
||||
key: "imu_acc_ignore_rate",
|
||||
value: 10
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
key: "imu_acc_ignore_slope",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "airmode_type",
|
||||
|
@ -346,7 +350,7 @@ helper.defaultsDialog = (function() {
|
|||
value: 1500
|
||||
},
|
||||
],
|
||||
"features":[
|
||||
"features": [
|
||||
{
|
||||
bit: 4, // Enable MOTOR_STOP
|
||||
state: true
|
||||
|
@ -377,7 +381,7 @@ helper.defaultsDialog = (function() {
|
|||
},
|
||||
{
|
||||
key: "dterm_lpf_hz",
|
||||
value: 40
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
key: "d_boost_factor",
|
||||
|
@ -437,7 +441,7 @@ helper.defaultsDialog = (function() {
|
|||
},
|
||||
{
|
||||
key: "nav_fw_pos_xy_p",
|
||||
value: 50
|
||||
value: 60
|
||||
},
|
||||
{
|
||||
key: "fw_turn_assist_pitch_gain",
|
||||
|
@ -475,21 +479,13 @@ helper.defaultsDialog = (function() {
|
|||
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
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
key: "imu_acc_ignore_slope",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "airmode_type",
|
||||
|
@ -520,7 +516,7 @@ helper.defaultsDialog = (function() {
|
|||
value: 1500
|
||||
},
|
||||
],
|
||||
"features":[
|
||||
"features": [
|
||||
{
|
||||
bit: 4, // Enable MOTOR_STOP
|
||||
state: true
|
||||
|
@ -618,7 +614,7 @@ helper.defaultsDialog = (function() {
|
|||
}
|
||||
]
|
||||
|
||||
publicScope.init = function() {
|
||||
publicScope.init = function () {
|
||||
mspHelper.getSetting("applied_defaults").then(privateScope.onInitSettingReturned);
|
||||
$container = $("#defaults-wrapper");
|
||||
};
|
||||
|
@ -658,7 +654,7 @@ helper.defaultsDialog = (function() {
|
|||
GUI.log(chrome.i18n.getMessage('configurationEepromSaved'));
|
||||
|
||||
if (selectedDefaultPreset.reboot) {
|
||||
GUI.tab_switch_cleanup(function() {
|
||||
GUI.tab_switch_cleanup(function () {
|
||||
MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () {
|
||||
//noinspection JSUnresolvedVariable
|
||||
GUI.log(chrome.i18n.getMessage('deviceRebooting'));
|
||||
|
@ -671,7 +667,7 @@ helper.defaultsDialog = (function() {
|
|||
});
|
||||
};
|
||||
|
||||
privateScope.onPresetClick = function(event) {
|
||||
privateScope.onPresetClick = function (event) {
|
||||
$container.hide();
|
||||
let selectedDefaultPreset = data[$(event.currentTarget).data("index")];
|
||||
if (selectedDefaultPreset && selectedDefaultPreset.settings) {
|
||||
|
@ -682,7 +678,7 @@ helper.defaultsDialog = (function() {
|
|||
}
|
||||
};
|
||||
|
||||
privateScope.render = function() {
|
||||
privateScope.render = function () {
|
||||
let $place = $container.find('.defaults-dialog__options');
|
||||
$place.html("");
|
||||
for (let i in data) {
|
||||
|
@ -703,7 +699,7 @@ helper.defaultsDialog = (function() {
|
|||
}
|
||||
}
|
||||
|
||||
privateScope.onInitSettingReturned = function(promise) {
|
||||
privateScope.onInitSettingReturned = function (promise) {
|
||||
if (promise.value > 0) {
|
||||
return; //Defaults were applied, we can just ignore
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ presets.elementHelper = function (group, field, value) {
|
|||
};
|
||||
|
||||
presets.defaultValues = {
|
||||
INAV_PID_CONFIG: {"asynchronousMode": "0", "accelerometerTaskFrequency": 500, "attitudeTaskFrequency": 250, "magHoldRateLimit": 90, "magHoldErrorLpfFrequency": 2, "yawJumpPreventionLimit": 200, "gyroscopeLpf": "3", "accSoftLpfHz": 15},
|
||||
RC_tuning: {"RC_RATE": 1, "RC_EXPO": 0.7, "roll_pitch_rate": 0, "roll_rate": 200, "pitch_rate": 200, "yaw_rate": 200, "dynamic_THR_PID": 0, "throttle_MID": 0.5, "throttle_EXPO": 0, "dynamic_THR_breakpoint": 1500, "RC_YAW_EXPO": 0.2},
|
||||
PID_ADVANCED: {"rollPitchItermIgnoreRate": 200, "yawItermIgnoreRate": 50, "yawPLimit": 300, "axisAccelerationLimitRollPitch": 0, "axisAccelerationLimitYaw": 1000},
|
||||
FILTER_CONFIG: {"gyroSoftLpfHz": 60, "dtermLpfHz": 40, "yawLpfHz": 30, "gyroNotchHz1": 0, "gyroNotchCutoff1": 0, "dtermNotchHz": 0, "dtermNotchCutoff": 0, "gyroNotchHz2": 0, "gyroNotchCutoff2": 0, "accNotchHz": 0, "accNotchCutoff": 0, "gyroStage2LowpassHz": 0}
|
||||
INAV_PID_CONFIG: { "asynchronousMode": "0", "accelerometerTaskFrequency": 500, "attitudeTaskFrequency": 250, "magHoldRateLimit": 90, "magHoldErrorLpfFrequency": 2, "yawJumpPreventionLimit": 200, "gyroscopeLpf": "3", "accSoftLpfHz": 15 },
|
||||
RC_tuning: { "RC_RATE": 1, "RC_EXPO": 0.7, "roll_pitch_rate": 0, "roll_rate": 200, "pitch_rate": 200, "yaw_rate": 200, "dynamic_THR_PID": 0, "throttle_MID": 0.5, "throttle_EXPO": 0, "dynamic_THR_breakpoint": 1500, "RC_YAW_EXPO": 0.2 },
|
||||
PID_ADVANCED: { "rollPitchItermIgnoreRate": 200, "yawItermIgnoreRate": 50, "yawPLimit": 300, "axisAccelerationLimitRollPitch": 0, "axisAccelerationLimitYaw": 1000 },
|
||||
FILTER_CONFIG: { "gyroSoftLpfHz": 60, "dtermLpfHz": 40, "yawLpfHz": 30, "gyroNotchHz1": 0, "gyroNotchCutoff1": 0, "dtermNotchHz": 0, "dtermNotchCutoff": 0, "gyroNotchHz2": 0, "gyroNotchCutoff2": 0, "accNotchHz": 0, "accNotchCutoff": 0, "gyroStage2LowpassHz": 0 }
|
||||
};
|
||||
|
||||
presets.settings = {
|
||||
|
@ -26,7 +26,7 @@ presets.settings = {
|
|||
},
|
||||
MR: {
|
||||
},
|
||||
get: function(mixerType) {
|
||||
get: function (mixerType) {
|
||||
var settings = {};
|
||||
$.extend(settings, presets.settings.COMMON);
|
||||
if (mixerType == 'multirotor') {
|
||||
|
@ -968,7 +968,7 @@ presets.presets = [
|
|||
},
|
||||
{
|
||||
key: "dterm_lpf_hz",
|
||||
value: 40
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
key: "d_boost_factor",
|
||||
|
@ -1028,7 +1028,7 @@ presets.presets = [
|
|||
},
|
||||
{
|
||||
key: "nav_fw_pos_xy_p",
|
||||
value: 50
|
||||
value: 60
|
||||
},
|
||||
{
|
||||
key: "fw_turn_assist_pitch_gain",
|
||||
|
@ -1052,7 +1052,7 @@ presets.presets = [
|
|||
},
|
||||
{
|
||||
key: "fw_ff_pitch",
|
||||
value: 60
|
||||
value: 80
|
||||
},
|
||||
{
|
||||
key: "fw_p_roll",
|
||||
|
@ -1080,7 +1080,11 @@ presets.presets = [
|
|||
},
|
||||
{
|
||||
key: "imu_acc_ignore_rate",
|
||||
value: 10
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
key: "imu_acc_ignore_slope",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "airmode_type",
|
||||
|
@ -1138,7 +1142,7 @@ presets.presets = [
|
|||
},
|
||||
{
|
||||
key: "dterm_lpf_hz",
|
||||
value: 40
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
key: "d_boost_factor",
|
||||
|
@ -1198,7 +1202,7 @@ presets.presets = [
|
|||
},
|
||||
{
|
||||
key: "nav_fw_pos_xy_p",
|
||||
value: 50
|
||||
value: 60
|
||||
},
|
||||
{
|
||||
key: "fw_turn_assist_pitch_gain",
|
||||
|
@ -1236,21 +1240,13 @@ presets.presets = [
|
|||
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
|
||||
value: 8
|
||||
},
|
||||
{
|
||||
key: "imu_acc_ignore_slope",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
key: "airmode_type",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue