Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tabs/configuration.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/tabs/configuration.js b/tabs/configuration.js
index 7056ff8c..7b4b5180 100644
--- a/tabs/configuration.js
+++ b/tabs/configuration.js
@@ -580,11 +580,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
$('a.save').click(function () {
- // gather data that doesn't have automatic change event bound
- BF_CONFIG.board_align_roll = Math.round(parseFloat($('input[name="board_align_roll"]').val()) * 10);
- BF_CONFIG.board_align_pitch = Math.round(parseFloat($('input[name="board_align_pitch"]').val()) * 10);
- BF_CONFIG.board_align_yaw = Math.round(parseFloat($('input[name="board_align_yaw"]').val()) * 10);
-
MISC.mag_declination = parseFloat($('#mag_declination').val());
ARMING_CONFIG.auto_disarm_delay = parseInt($('input[name="autodisarmdelay"]').val());
@@ -607,9 +602,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
MISC.battery_capacity_critical = parseInt($('#battery_capacity_critical').val() * MISC.battery_capacity / 100);
MISC.battery_capacity_unit = $('#battery_capacity_unit').val();
- BF_CONFIG.currentscale = parseInt($('#currentscale').val());
- BF_CONFIG.currentoffset = Math.round(parseFloat($('#currentoffset').val()) * 10);
-
_3D.deadband3d_low = parseInt($('#3ddeadbandlow').val());
_3D.deadband3d_high = parseInt($('#3ddeadbandhigh').val());
_3D.neutral3d = parseInt($('#3dneutral').val());
@@ -663,6 +655,11 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
helper.features.reset();
helper.features.fromUI($('.tab-configuration'));
helper.features.execute(function () {
+ BF_CONFIG.board_align_roll = Math.round(parseFloat($('input[name="board_align_roll"]').val()) * 10);
+ BF_CONFIG.board_align_pitch = Math.round(parseFloat($('input[name="board_align_pitch"]').val()) * 10);
+ BF_CONFIG.board_align_yaw = Math.round(parseFloat($('input[name="board_align_yaw"]').val()) * 10);
+ BF_CONFIG.currentscale = parseInt($('#currentscale').val());
+ BF_CONFIG.currentoffset = Math.round(parseFloat($('#currentoffset').val()) * 10);
saveChainer.execute();
});
});