mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 01:35:23 +03:00
Improved defaults dialog
This commit is contained in:
parent
247620cb6b
commit
a23a3fe1e3
2 changed files with 74 additions and 1 deletions
|
@ -12,6 +12,7 @@ helper.defaultsDialog = (function() {
|
||||||
|
|
||||||
let data = [{
|
let data = [{
|
||||||
"title": 'Mini Quad with 3"-7" propellers',
|
"title": 'Mini Quad with 3"-7" propellers',
|
||||||
|
"notRecommended": false,
|
||||||
"settings": [
|
"settings": [
|
||||||
/*
|
/*
|
||||||
System
|
System
|
||||||
|
@ -160,6 +161,10 @@ helper.defaultsDialog = (function() {
|
||||||
key: "mc_i_yaw",
|
key: "mc_i_yaw",
|
||||||
value: 80
|
value: 80
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "platform_type",
|
||||||
|
value: "MULTIROTOR"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "applied_defaults",
|
key: "applied_defaults",
|
||||||
value: 2
|
value: 2
|
||||||
|
@ -168,6 +173,7 @@ helper.defaultsDialog = (function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": 'Airplane',
|
"title": 'Airplane',
|
||||||
|
"notRecommended": false,
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
|
@ -194,6 +200,10 @@ helper.defaultsDialog = (function() {
|
||||||
key: "small_angle",
|
key: "small_angle",
|
||||||
value: 180
|
value: 180
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "platform_type",
|
||||||
|
value: "AIRPLANE"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: "applied_defaults",
|
key: "applied_defaults",
|
||||||
value: 3
|
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)',
|
"title": 'Custom UAV - INAV legacy defaults (Not recommended)',
|
||||||
|
"notRecommended": true,
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
key: "applied_defaults",
|
key: "applied_defaults",
|
||||||
|
@ -217,6 +274,7 @@ helper.defaultsDialog = (function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": 'Keep current settings (Not recommended)',
|
"title": 'Keep current settings (Not recommended)',
|
||||||
|
"notRecommended": true,
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
key: "applied_defaults",
|
key: "applied_defaults",
|
||||||
|
@ -298,6 +356,10 @@ helper.defaultsDialog = (function() {
|
||||||
<a class='confirm' href='#'></a>\
|
<a class='confirm' href='#'></a>\
|
||||||
</div>")
|
</div>")
|
||||||
|
|
||||||
|
if (preset.notRecommended) {
|
||||||
|
$element.addClass("defaults_btn--not-recommended");
|
||||||
|
}
|
||||||
|
|
||||||
$element.find("a").html(preset.title);
|
$element.find("a").html(preset.title);
|
||||||
$element.data("index", i).click(privateScope.onPresetClick)
|
$element.data("index", i).click(privateScope.onPresetClick)
|
||||||
$element.appendTo($place);
|
$element.appendTo($place);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
z-index: 2002;
|
z-index: 2002;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
height: 400px;
|
height: 450px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@ -43,4 +43,15 @@
|
||||||
.defaults_btn a {
|
.defaults_btn a {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.defaults_btn--not-recommended a {
|
||||||
|
color: #444;
|
||||||
|
border: 1px solid #666;
|
||||||
|
background-image: linear-gradient(45deg, #fcea97 25%, #ffffff 25%, #ffffff 50%, #fcea97 50%, #fcea97 75%, #ffffff 75%, #ffffff 100%);
|
||||||
|
background-size: 56.57px 56.57px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.defaults_btn--not-recommended a:hover {
|
||||||
|
color: #222 !important;
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue