simplify some of the change events

10.3.x-maintenance
cTn 2014-09-18 12:32:27 +02:00
parent 800bfd59c8
commit 287a1df962
1 changed files with 4 additions and 12 deletions

View File

@ -150,9 +150,7 @@ TABS.configuration.initialize = function (callback) {
} }
gps_type_e.change(function () { gps_type_e.change(function () {
var val = parseInt($(this).val()); MISC.gps_type = parseInt($(this).val());
MISC.gps_type = val;
}); });
var gps_baudrate_e = $('select.gps_baudrate'); var gps_baudrate_e = $('select.gps_baudrate');
@ -161,9 +159,7 @@ TABS.configuration.initialize = function (callback) {
} }
gps_baudrate_e.change(function () { gps_baudrate_e.change(function () {
var val = parseInt($(this).val()); MISC.gps_baudrate = parseInt($(this).val());
MISC.gps_baudrate = val;
}); });
var gps_ubx_sbas_e = $('select.gps_ubx_sbas'); var gps_ubx_sbas_e = $('select.gps_ubx_sbas');
@ -172,9 +168,7 @@ TABS.configuration.initialize = function (callback) {
} }
gps_ubx_sbas_e.change(function () { gps_ubx_sbas_e.change(function () {
var val = parseInt($(this).val()); MISC.gps_ubx_sbas = parseInt($(this).val());
MISC.gps_ubx_sbas = val;
}); });
// select current gps configuration // select current gps configuration
@ -196,9 +190,7 @@ TABS.configuration.initialize = function (callback) {
} }
serialRX_e.change(function () { serialRX_e.change(function () {
var val = parseInt($(this).val()); BF_CONFIG.serialrx_type = parseInt($(this).val());
BF_CONFIG.serialrx_type = val;
}); });
// select current serial RX type // select current serial RX type