-
-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort of 3 optionlist at failsafe tab #3211
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -249,6 +249,9 @@ failsafe.initialize = function (callback) { | |||||
break; | ||||||
} | ||||||
|
||||||
// Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text | ||||||
$('#failsafeSwitchSelect').sortSelect(); | ||||||
|
||||||
// `failsafe_kill_switch` has been renamed to `failsafe_switch_mode`. | ||||||
// It is backwards compatible with `failsafe_kill_switch` | ||||||
$('select[name="failsafe_switch_mode"]').val(FC.FAILSAFE_CONFIG.failsafe_switch_mode); | ||||||
|
@@ -265,8 +268,13 @@ failsafe.initialize = function (callback) { | |||||
$('input[name="gps_rescue_throttle_max"]').val(FC.GPS_RESCUE.throttleMax); | ||||||
$('input[name="gps_rescue_throttle_hover"]').val(FC.GPS_RESCUE.throttleHover); | ||||||
$('input[name="gps_rescue_min_sats"]').val(FC.GPS_RESCUE.minSats); | ||||||
// Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text | ||||||
$('#failsafeGpsRescueItemSanitySelect').sortSelect(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we follow similar patter to above of using
Suggested change
|
||||||
$('select[name="gps_rescue_sanity_checks"]').val(FC.GPS_RESCUE.sanityChecks); | ||||||
|
||||||
// Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text | ||||||
$('#failsafeGpsRescueItemAltitudeSelect').sortSelect(); | ||||||
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) { | ||||||
$('input[name="gps_rescue_ascend_rate"]').val((FC.GPS_RESCUE.ascendRate / 100).toFixed(2)); | ||||||
$('input[name="gps_rescue_descend_rate"]').val((FC.GPS_RESCUE.descendRate / 100).toFixed(2)); | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -47,7 +47,7 @@ | |||||
<div class="spacer_box"> | ||||||
<div class="number"> | ||||||
<label> | ||||||
<select class="switchMode" name="failsafe_switch_mode"> | ||||||
<select id="failsafeSwitchSelect" class="switchMode" name="failsafe_switch_mode"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need special ids for this. In general
Suggested change
|
||||||
<option value="0" i18n="failsafeSwitchOptionStage1"></option> | ||||||
<option value="2" i18n="failsafeSwitchOptionStage2"></option> | ||||||
<option value="1" i18n="failsafeSwitchOptionKill"></option> | ||||||
|
@@ -181,7 +181,7 @@ | |||||
</div> | ||||||
<div class="number"> | ||||||
<label> | ||||||
<select class="switchMode" name="gps_rescue_altitude_mode"> | ||||||
<select id="failsafeGpsRescueItemAltitudeSelect" class="switchMode" name="gps_rescue_altitude_mode"> | ||||||
<option value="0" i18n="failsafeGpsRescueItemAltitudeModeMaxAlt"></option> | ||||||
<option value="1" i18n="failsafeGpsRescueItemAltitudeModeFixedAlt"></option> | ||||||
<option value="2" i18n="failsafeGpsRescueItemAltitudeModeCurrentAlt"></option> | ||||||
|
@@ -191,7 +191,7 @@ | |||||
</div> | ||||||
<div class="number"> | ||||||
<label> | ||||||
<select class="switchMode" name="gps_rescue_sanity_checks"> | ||||||
<select id="failsafeGpsRescueItemSanitySelect" class="switchMode" name="gps_rescue_sanity_checks"> | ||||||
<option value="0" i18n="failsafeGpsRescueItemSanityChecksOff"></option> | ||||||
<option value="1" i18n="failsafeGpsRescueItemSanityChecksOn"></option> | ||||||
<option value="2" i18n="failsafeGpsRescueItemSanityChecksFSOnly"></option> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.