1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 01:05:12 +03:00

Improved defaults dialog

This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-04-25 13:27:49 +02:00
parent 247620cb6b
commit a23a3fe1e3
2 changed files with 74 additions and 1 deletions

View file

@ -12,6 +12,7 @@ helper.defaultsDialog = (function() {
let data = [{
"title": 'Mini Quad with 3"-7" propellers',
"notRecommended": false,
"settings": [
/*
System
@ -160,6 +161,10 @@ helper.defaultsDialog = (function() {
key: "mc_i_yaw",
value: 80
},
{
key: "platform_type",
value: "MULTIROTOR"
},
{
key: "applied_defaults",
value: 2
@ -168,6 +173,7 @@ helper.defaultsDialog = (function() {
},
{
"title": 'Airplane',
"notRecommended": false,
"id": 3,
"settings": [
{
@ -194,6 +200,10 @@ helper.defaultsDialog = (function() {
key: "small_angle",
value: 180
},
{
key: "platform_type",
value: "AIRPLANE"
},
{
key: "applied_defaults",
value: 3
@ -206,8 +216,55 @@ helper.defaultsDialog = (function() {
}
]
},
{
"title": 'Rovers & Boats',
"notRecommended": false,
"settings": [
{
key: "applied_defaults",
value: 1
},
{
key: "failsafe_procedure",
value: "DROP"
},
{
key: "platform_type",
value: "ROVER"
},
{
key: "nav_wp_safe_distance",
value: 50000
},
{
key: "nav_fw_loiter_radius",
value: 100
},
{
key: "nav_fw_yaw_deadband",
value: 5
},
{
key: "pidsum_limit_yaw",
value: 500
},
{
key: "nav_fw_pos_hdg_p",
value: 60
},
{
key: "nav_fw_pos_hdg_i",
value: 2
},
{
key: "nav_fw_pos_hdg_d",
value: 0
}
]
},
{
"title": 'Custom UAV - INAV legacy defaults (Not recommended)',
"notRecommended": true,
"settings": [
{
key: "applied_defaults",
@ -217,6 +274,7 @@ helper.defaultsDialog = (function() {
},
{
"title": 'Keep current settings (Not recommended)',
"notRecommended": true,
"settings": [
{
key: "applied_defaults",
@ -298,6 +356,10 @@ helper.defaultsDialog = (function() {
<a class='confirm' href='#'></a>\
</div>")
if (preset.notRecommended) {
$element.addClass("defaults_btn--not-recommended");
}
$element.find("a").html(preset.title);
$element.data("index", i).click(privateScope.onPresetClick)
$element.appendTo($place);