From b61d20323d917a8838efdfe1d62156a6a5775a1c Mon Sep 17 00:00:00 2001 From: Stewart Loving-Gibbard Date: Fri, 6 Oct 2017 07:03:18 -0700 Subject: [PATCH 1/4] This functions, but does not look great, and needs some debris cleaned up before merging. This could ship in an emergency but I will try to do better first. --- _locales/en/messages.json | 15 ++++++++ js/fc.js | 18 ++++++++- js/msp/MSPHelper.js | 61 ++++++++++++++++++++++++++++++ tabs/failsafe.html | 78 +++++++++++++++++++++++++++++++++++++++ tabs/failsafe.js | 12 ++++++ 5 files changed, 183 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d0cb9187..514ba2fe 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1721,6 +1721,21 @@ "failsafeKillSwitchHelp": { "message": "Set this option to make the failsafe switch, configured in the modes tab, act as a direct kill switch, bypassing the selected failsafe procedure. Note: Arming is blocked with the failsafe kill switch in the ON position" }, + + + + + + "failsafeMinDistanceItem": { + "message": "Failsafe Minimum Distance" + }, + "failsafeMinDistanceProcedureItem": { + "message": "Failsafe Minimum Distance Procedure" + }, + + + + "mainHelpArmed": { "message": "Motor Arming" }, diff --git a/js/fc.js b/js/fc.js index 4805823a..a4ea24d7 100644 --- a/js/fc.js +++ b/js/fc.js @@ -376,7 +376,15 @@ var FC = { failsafe_throttle: 0, failsafe_kill_switch: 0, failsafe_throttle_low_delay: 0, - failsafe_procedure: 0 + failsafe_procedure: 0, + failsafe_recovery_delay: 0, + + failsafe_fw_roll_angle: 0, + failsafe_fw_pitch_angle: 0, + failsafe_fw_yaw_rate: 0, + failsafe_stick_motion_threshold: 0, + failsafe_min_distance: 0, + failsafe_min_distance_procedure: 0 }; FW_CONFIG = { @@ -464,6 +472,14 @@ var FC = { ); } + // Unsure which version these will actually deploy in, guidance welcome. Using 1.7.3 + // so it works for the moment. And I'm really not sure how it works anyhow + if (semver.gte(CONFIG.flightControllerVersion, '1.7.3')) { + features.push( + {bit: 30, group: 'rxFailsafeExtended', name: 'FAILSAFE_EXTENDED', haveTip: false, showNameInTip: false} + ); + } + return features.reverse(); }, isFeatureEnabled: function (featureName, features) { diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 1b0dcced..7865c57e 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -617,8 +617,25 @@ var mspHelper = (function (gui) { offset += 2; FAILSAFE_CONFIG.failsafe_procedure = data.getUint8(offset); offset++; + FAILSAFE_CONFIG.failsafe_recovery_delay = data.getUint8(offset); + offset++; + + FAILSAFE_CONFIG.failsafe_fw_roll_angle = data.getUint16(offset, true); + offset += 2; + FAILSAFE_CONFIG.failsafe_fw_pitch_angle = data.getUint16(offset, true); + offset += 2; + FAILSAFE_CONFIG.failsafe_fw_yaw_rate = data.getUint16(offset, true); + offset += 2; + FAILSAFE_CONFIG.failsafe_stick_motion_threshold = data.getUint16(offset, true); + offset += 2; + FAILSAFE_CONFIG.failsafe_min_distance = data.getUint16(offset, true); + offset += 2; + FAILSAFE_CONFIG.failsafe_min_distance_procedure = data.getUint8(offset); + offset++; + break; + case MSPCodes.MSP_RXFAIL_CONFIG: //noinspection JSUndeclaredVariable RXFAIL_CONFIG = []; // empty the array as new data is coming in @@ -1194,6 +1211,50 @@ var mspHelper = (function (gui) { buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_throttle_low_delay)); buffer.push(highByte(FAILSAFE_CONFIG.failsafe_throttle_low_delay)); buffer.push(FAILSAFE_CONFIG.failsafe_procedure); + buffer.push(FAILSAFE_CONFIG.failsafe_recovery_delay); + + // API version check needed here? + //if (semver.gte(CONFIG.apiVersion, "1.21.0")) { + + + buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_fw_roll_angle)); + buffer.push(highByte(FAILSAFE_CONFIG.failsafe_fw_roll_angle)); + + buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_fw_pitch_angle)); + buffer.push(highByte(FAILSAFE_CONFIG.failsafe_fw_pitch_angle)); + + buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_fw_yaw_rate)); + buffer.push(highByte(FAILSAFE_CONFIG.failsafe_fw_yaw_rate)); + + buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_stick_motion_threshold)); + buffer.push(highByte(FAILSAFE_CONFIG.failsafe_stick_motion_threshold)); + + buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_min_distance)); + buffer.push(highByte(FAILSAFE_CONFIG.failsafe_min_distance)); + + buffer.push(FAILSAFE_CONFIG.failsafe_min_distance_procedure); + //} +/* + + FAILSAFE_CONFIG. = data.getUint8(offset); + offset++; + FAILSAFE_CONFIG. = data.getUint16(offset); + offset += 2; + FAILSAFE_CONFIG. = data.getUint16(offset); + offset += 2; + FAILSAFE_CONFIG. = data.getUint16(offset); + offset += 2; + FAILSAFE_CONFIG. = data.getUint16(offset); + offset += 2; + FAILSAFE_CONFIG. = data.getUint16(offset); + offset += 2; + FAILSAFE_CONFIG. = data.getUint8(offset); + offset++; + +*/ + + + break; case MSPCodes.MSP_SET_TRANSPONDER_CONFIG: diff --git a/tabs/failsafe.html b/tabs/failsafe.html index 185d8065..5f0f9c78 100644 --- a/tabs/failsafe.html +++ b/tabs/failsafe.html @@ -109,9 +109,87 @@ + + +
+ +
+
+ +
+
+
+ +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/tabs/failsafe.js b/tabs/failsafe.js index 3ceccb1c..f67098d7 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -227,6 +227,14 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { $('input[name="failsafe_throttle_low_delay"]').val(FAILSAFE_CONFIG.failsafe_throttle_low_delay); $('input[name="failsafe_delay"]').val(FAILSAFE_CONFIG.failsafe_delay); + // Raw basics; needs a lot of treatment to be better -- SLG + alert('failsafe_stick_motion_threshold: ' + FAILSAFE_CONFIG.failsafe_stick_motion_threshold); + alert('failsafe_min_distance: ' + FAILSAFE_CONFIG.failsafe_min_distance); + + $('input[name="failsafe_min_distance"]').val(FAILSAFE_CONFIG.failsafe_min_distance); + $('input[name="failsafe_min_distance_procedure"]').val(FAILSAFE_CONFIG.failsafe_min_distance_procedure); + + // set stage 2 failsafe procedure $('input[type="radio"].procedure').change(function () { var element = $(this), @@ -294,6 +302,10 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { FAILSAFE_CONFIG.failsafe_throttle_low_delay = parseInt($('input[name="failsafe_throttle_low_delay"]').val()); FAILSAFE_CONFIG.failsafe_delay = parseInt($('input[name="failsafe_delay"]').val()); + FAILSAFE_CONFIG.failsafe_min_distance = parseInt($('input[name="failsafe_min_distance"]').val()); + FAILSAFE_CONFIG.failsafe_min_distance_procedure = parseInt($('input[name="failsafe_min_distance_procedure"]').val()); + + if ($('input[id="land"]').is(':checked')) { FAILSAFE_CONFIG.failsafe_procedure = 0; } else if ($('input[id="drop"]').is(':checked')) { From 2ddcd38a48abddfd257dc284620f96995fe28e79 Mon Sep 17 00:00:00 2001 From: Stewart Loving-Gibbard Date: Fri, 6 Oct 2017 08:27:00 -0700 Subject: [PATCH 2/4] Working dropdown for minimum distance procedure. * Needs to look tidier * Needs help annotations * needs controlling checkbox --- js/fc.js | 9 ++++++++- tabs/failsafe.html | 26 +++++++++++--------------- tabs/failsafe.js | 33 ++++++++++++++++++++++++++++----- 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/js/fc.js b/js/fc.js index a4ea24d7..1d67a931 100644 --- a/js/fc.js +++ b/js/fc.js @@ -378,7 +378,6 @@ var FC = { failsafe_throttle_low_delay: 0, failsafe_procedure: 0, failsafe_recovery_delay: 0, - failsafe_fw_roll_angle: 0, failsafe_fw_pitch_angle: 0, failsafe_fw_yaw_rate: 0, @@ -895,5 +894,13 @@ var FC = { }, getRthAltControlMode: function () { return ["Current", "Extra", "Fixed", "Max", "At Least"]; + }, + getFailsafeProcedure: function () { + return [ + "Land", + "Drop", + "RTH", + "Do Nothing", + ]; } }; diff --git a/tabs/failsafe.html b/tabs/failsafe.html index 5f0f9c78..ff7a6b49 100644 --- a/tabs/failsafe.html +++ b/tabs/failsafe.html @@ -111,23 +111,19 @@
-
+
-
-
- -
-
-
- -
-
+
+ +
+
+ + +
@@ -189,7 +185,7 @@ - +
diff --git a/tabs/failsafe.js b/tabs/failsafe.js index f67098d7..86466fdb 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -75,6 +75,8 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { // translate to user-selected language localize(); + var $failsafeMinDistanceProcedure = $('#failsafe_min_distance_procedure'); + // generate labels for assigned aux modes var auxAssignment = [], i, @@ -228,12 +230,11 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { $('input[name="failsafe_delay"]').val(FAILSAFE_CONFIG.failsafe_delay); // Raw basics; needs a lot of treatment to be better -- SLG - alert('failsafe_stick_motion_threshold: ' + FAILSAFE_CONFIG.failsafe_stick_motion_threshold); - alert('failsafe_min_distance: ' + FAILSAFE_CONFIG.failsafe_min_distance); + //alert('failsafe_stick_motion_threshold: ' + FAILSAFE_CONFIG.failsafe_stick_motion_threshold); + //alert('failsafe_min_distance: ' + FAILSAFE_CONFIG.failsafe_min_distance); $('input[name="failsafe_min_distance"]').val(FAILSAFE_CONFIG.failsafe_min_distance); - $('input[name="failsafe_min_distance_procedure"]').val(FAILSAFE_CONFIG.failsafe_min_distance_procedure); - + //$('input[name="failsafe_min_distance_procedure"]').val(FAILSAFE_CONFIG.failsafe_min_distance_procedure); // set stage 2 failsafe procedure $('input[type="radio"].procedure').change(function () { @@ -284,6 +285,28 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { // set stage 2 kill switch option $('input[name="failsafe_kill_switch"]').prop('checked', FAILSAFE_CONFIG.failsafe_kill_switch); + + + + + + + + // Alternate, minimum distance failsafe procedure + GUI.fillSelect($failsafeMinDistanceProcedure, FC.getFailsafeProcedure(), FAILSAFE_CONFIG.failsafe_min_distance_procedure); + $failsafeMinDistanceProcedure.val(FAILSAFE_CONFIG.failsafe_min_distance_procedure); + $failsafeMinDistanceProcedure.change(function () { + FAILSAFE_CONFIG.failsafe_min_distance_procedure = $failsafeMinDistanceProcedure.val(); + }); + + + + + + + + + $('a.save').click(function () { // gather data that doesn't have automatic change event bound RX_CONFIG.rx_min_usec = parseInt($('input[name="rx_min_usec"]').val()); @@ -303,7 +326,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { FAILSAFE_CONFIG.failsafe_delay = parseInt($('input[name="failsafe_delay"]').val()); FAILSAFE_CONFIG.failsafe_min_distance = parseInt($('input[name="failsafe_min_distance"]').val()); - FAILSAFE_CONFIG.failsafe_min_distance_procedure = parseInt($('input[name="failsafe_min_distance_procedure"]').val()); + //FAILSAFE_CONFIG.failsafe_min_distance_procedure = parseInt($('input[name="failsafe_min_distance_procedure"]').val()); if ($('input[id="land"]').is(':checked')) { From f642024886bcdfd5d4a7135f37763f220d2c8105 Mon Sep 17 00:00:00 2001 From: Stewart Loving-Gibbard Date: Sat, 7 Oct 2017 00:19:40 -0700 Subject: [PATCH 3/4] I believe this is now fully working. It needs some spacing/comments cleanup I think, and I need some guidance about version limiting its display. I don't know what the next version is, etc. --- _locales/en/messages.json | 15 ++++++++++-- src/css/tabs/failsafe.css | 6 +++++ tabs/failsafe.html | 21 ++++++++++++---- tabs/failsafe.js | 51 ++++++++++++++++++++++++--------------- 4 files changed, 66 insertions(+), 27 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 514ba2fe..7852abb4 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1724,15 +1724,26 @@ - + "failsafeUseMinimumDistanceItem": { + "message": "Use alternate Minimum Distance Failsafe Procedure when close to Home" + }, + "failsafeUseMinimumDistanceHelp": { + "message": "Set this option if you need an alternate failsafe behavior when the craft is close to Home. For example the author of the feature has a plane that failsafes when the wings detach on landing, when the RTH failsafe behavior normally desired in flight is no longer wanted or needed." + }, "failsafeMinDistanceItem": { "message": "Failsafe Minimum Distance" }, + "failsafeMinDistanceHelp": { + "message": "The craft will use the alternate failsafe behavior when it is between 0 and this minimum distance in meters away from Home. For example if set to 20 meters, if the craft is at 13 meters the Failsafe Minimum Distance Procedure will be followed. At 25 meters, the normal failsafe procedure will be followed. If set to 0, the normal failsafe procedure will be used at all times. " + }, + "failsafeMinDistanceProcedureItem": { "message": "Failsafe Minimum Distance Procedure" }, - + "failsafeMinDistanceProcedureHelp": { + "message": "This is the failsafe procedure that will be followed when the craft is closer than the Minimum Distance from Home." + }, diff --git a/src/css/tabs/failsafe.css b/src/css/tabs/failsafe.css index 7b5ee035..ea96ec14 100644 --- a/src/css/tabs/failsafe.css +++ b/src/css/tabs/failsafe.css @@ -253,6 +253,12 @@ height: 90px; } +.tab-failsafe .minimumDistance { + width: 100px !important; + padding-left: 3px; + margin-right: 11px; +} + @media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) { } diff --git a/tabs/failsafe.html b/tabs/failsafe.html index ff7a6b49..c4d0b0ef 100644 --- a/tabs/failsafe.html +++ b/tabs/failsafe.html @@ -111,18 +111,29 @@
-
+
-
-
+ +
+
-
- +
+ +
diff --git a/tabs/failsafe.js b/tabs/failsafe.js index 86466fdb..e1943b9a 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -75,6 +75,12 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { // translate to user-selected language localize(); + var $failsafeUseMinimumDistanceCheckbox = $('#failsafe_use_minimum_distance'); + + var $failsafeMinDistanceElements = $('#failsafe_min_distance_elements') + var $failsafeMinDistance = $('#failsafe_min_distance') + + var $failsafeMinDistanceProcedureElements = $('#failsafe_min_distance_procedure_elements') var $failsafeMinDistanceProcedure = $('#failsafe_min_distance_procedure'); // generate labels for assigned aux modes @@ -211,7 +217,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { isFailsafeEnabled = bit_check(BF_CONFIG.features, 8); } - // fill stage 2 fields + // Change Failsafe Procedure Minimum Distance appropriately when checkbox manipulated failsafeFeature = $('input[name="failsafe_feature_new"]'); failsafeFeature.change(function () { if ($(this).is(':checked')) { @@ -228,13 +234,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { $('input[name="failsafe_off_delay"]').val(FAILSAFE_CONFIG.failsafe_off_delay); $('input[name="failsafe_throttle_low_delay"]').val(FAILSAFE_CONFIG.failsafe_throttle_low_delay); $('input[name="failsafe_delay"]').val(FAILSAFE_CONFIG.failsafe_delay); - - // Raw basics; needs a lot of treatment to be better -- SLG - //alert('failsafe_stick_motion_threshold: ' + FAILSAFE_CONFIG.failsafe_stick_motion_threshold); - //alert('failsafe_min_distance: ' + FAILSAFE_CONFIG.failsafe_min_distance); - $('input[name="failsafe_min_distance"]').val(FAILSAFE_CONFIG.failsafe_min_distance); - //$('input[name="failsafe_min_distance_procedure"]').val(FAILSAFE_CONFIG.failsafe_min_distance_procedure); // set stage 2 failsafe procedure $('input[type="radio"].procedure').change(function () { @@ -285,12 +285,31 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { // set stage 2 kill switch option $('input[name="failsafe_kill_switch"]').prop('checked', FAILSAFE_CONFIG.failsafe_kill_switch); + // Adjust Minimum Distance values when checkbox is checked/unchecked + $failsafeUseMinimumDistanceCheckbox.change(function() { + if ($(this).is(':checked')) { + // 20 meters seems like a reasonable default for a minimum distance + $failsafeMinDistance.val(20); + $failsafeMinDistanceElements.show(); + $failsafeMinDistanceProcedureElements.show(); + } else { + // If they uncheck it, clear the distance to 0, which disables this feature + $failsafeMinDistance.val(0); + $failsafeMinDistanceElements.hide(); + $failsafeMinDistanceProcedureElements.hide(); + } + }) - - - - - + // Set initial state of controls according to data + if (FAILSAFE_CONFIG.failsafe_min_distance > 0) { + $failsafeUseMinimumDistanceCheckbox.prop('checked', true); + $failsafeMinDistanceElements.show(); + $failsafeMinDistanceProcedureElements.show(); + } else { + $failsafeUseMinimumDistanceCheckbox.prop('checked', false); + $failsafeMinDistanceElements.hide(); + $failsafeMinDistanceProcedureElements.hide(); + } // Alternate, minimum distance failsafe procedure GUI.fillSelect($failsafeMinDistanceProcedure, FC.getFailsafeProcedure(), FAILSAFE_CONFIG.failsafe_min_distance_procedure); @@ -299,14 +318,6 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { FAILSAFE_CONFIG.failsafe_min_distance_procedure = $failsafeMinDistanceProcedure.val(); }); - - - - - - - - $('a.save').click(function () { // gather data that doesn't have automatic change event bound RX_CONFIG.rx_min_usec = parseInt($('input[name="rx_min_usec"]').val()); From 9edac50952506935c78c93583c7c41590ded4ba3 Mon Sep 17 00:00:00 2001 From: Stewart Loving-Gibbard Date: Sat, 7 Oct 2017 22:20:10 -0700 Subject: [PATCH 4/4] Cleaning up some whitespace, adding comments to make clear where I still have questions. --- _locales/en/messages.json | 10 +--------- js/fc.js | 12 ++++++------ js/msp/MSPHelper.js | 28 ++++------------------------ tabs/failsafe.html | 9 +-------- tabs/failsafe.js | 5 ----- 5 files changed, 12 insertions(+), 52 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 7852abb4..cc22f255 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1721,32 +1721,24 @@ "failsafeKillSwitchHelp": { "message": "Set this option to make the failsafe switch, configured in the modes tab, act as a direct kill switch, bypassing the selected failsafe procedure. Note: Arming is blocked with the failsafe kill switch in the ON position" }, - - - "failsafeUseMinimumDistanceItem": { "message": "Use alternate Minimum Distance Failsafe Procedure when close to Home" }, "failsafeUseMinimumDistanceHelp": { "message": "Set this option if you need an alternate failsafe behavior when the craft is close to Home. For example the author of the feature has a plane that failsafes when the wings detach on landing, when the RTH failsafe behavior normally desired in flight is no longer wanted or needed." }, - "failsafeMinDistanceItem": { "message": "Failsafe Minimum Distance" }, "failsafeMinDistanceHelp": { "message": "The craft will use the alternate failsafe behavior when it is between 0 and this minimum distance in meters away from Home. For example if set to 20 meters, if the craft is at 13 meters the Failsafe Minimum Distance Procedure will be followed. At 25 meters, the normal failsafe procedure will be followed. If set to 0, the normal failsafe procedure will be used at all times. " }, - "failsafeMinDistanceProcedureItem": { "message": "Failsafe Minimum Distance Procedure" }, "failsafeMinDistanceProcedureHelp": { "message": "This is the failsafe procedure that will be followed when the craft is closer than the Minimum Distance from Home." - }, - - - + }, "mainHelpArmed": { "message": "Motor Arming" }, diff --git a/js/fc.js b/js/fc.js index 1d67a931..b16e36fa 100644 --- a/js/fc.js +++ b/js/fc.js @@ -896,11 +896,11 @@ var FC = { return ["Current", "Extra", "Fixed", "Max", "At Least"]; }, getFailsafeProcedure: function () { - return [ - "Land", - "Drop", - "RTH", - "Do Nothing", - ]; + return { + 0: "Land", + 1: "Drop", + 2: "RTH", + 3: "Do Nothing", + } } }; diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 7865c57e..a9583bd7 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -619,7 +619,6 @@ var mspHelper = (function (gui) { offset++; FAILSAFE_CONFIG.failsafe_recovery_delay = data.getUint8(offset); offset++; - FAILSAFE_CONFIG.failsafe_fw_roll_angle = data.getUint16(offset, true); offset += 2; FAILSAFE_CONFIG.failsafe_fw_pitch_angle = data.getUint16(offset, true); @@ -632,10 +631,8 @@ var mspHelper = (function (gui) { offset += 2; FAILSAFE_CONFIG.failsafe_min_distance_procedure = data.getUint8(offset); offset++; - break; - case MSPCodes.MSP_RXFAIL_CONFIG: //noinspection JSUndeclaredVariable RXFAIL_CONFIG = []; // empty the array as new data is coming in @@ -1215,7 +1212,10 @@ var mspHelper = (function (gui) { // API version check needed here? //if (semver.gte(CONFIG.apiVersion, "1.21.0")) { - + // Or + // if (semver.gte(CONFIG.flightControllerVersion, "1.7.3")) { + // + // Guidance wanted... buffer.push(lowByte(FAILSAFE_CONFIG.failsafe_fw_roll_angle)); buffer.push(highByte(FAILSAFE_CONFIG.failsafe_fw_roll_angle)); @@ -1234,26 +1234,6 @@ var mspHelper = (function (gui) { buffer.push(FAILSAFE_CONFIG.failsafe_min_distance_procedure); //} -/* - - FAILSAFE_CONFIG. = data.getUint8(offset); - offset++; - FAILSAFE_CONFIG. = data.getUint16(offset); - offset += 2; - FAILSAFE_CONFIG. = data.getUint16(offset); - offset += 2; - FAILSAFE_CONFIG. = data.getUint16(offset); - offset += 2; - FAILSAFE_CONFIG. = data.getUint16(offset); - offset += 2; - FAILSAFE_CONFIG. = data.getUint16(offset); - offset += 2; - FAILSAFE_CONFIG. = data.getUint8(offset); - offset++; - -*/ - - break; diff --git a/tabs/failsafe.html b/tabs/failsafe.html index c4d0b0ef..097a78e7 100644 --- a/tabs/failsafe.html +++ b/tabs/failsafe.html @@ -110,10 +110,8 @@
- +
- -
@@ -135,13 +133,8 @@
-
- - - -
diff --git a/tabs/failsafe.js b/tabs/failsafe.js index e1943b9a..739dc48a 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -76,10 +76,8 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { localize(); var $failsafeUseMinimumDistanceCheckbox = $('#failsafe_use_minimum_distance'); - var $failsafeMinDistanceElements = $('#failsafe_min_distance_elements') var $failsafeMinDistance = $('#failsafe_min_distance') - var $failsafeMinDistanceProcedureElements = $('#failsafe_min_distance_procedure_elements') var $failsafeMinDistanceProcedure = $('#failsafe_min_distance_procedure'); @@ -335,10 +333,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { FAILSAFE_CONFIG.failsafe_off_delay = parseInt($('input[name="failsafe_off_delay"]').val()); FAILSAFE_CONFIG.failsafe_throttle_low_delay = parseInt($('input[name="failsafe_throttle_low_delay"]').val()); FAILSAFE_CONFIG.failsafe_delay = parseInt($('input[name="failsafe_delay"]').val()); - FAILSAFE_CONFIG.failsafe_min_distance = parseInt($('input[name="failsafe_min_distance"]').val()); - //FAILSAFE_CONFIG.failsafe_min_distance_procedure = parseInt($('input[name="failsafe_min_distance_procedure"]').val()); - if ($('input[id="land"]').is(':checked')) { FAILSAFE_CONFIG.failsafe_procedure = 0;