|
|
@ -10,23 +10,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|
|
|
googleAnalytics.sendAppView('Configuration');
|
|
|
|
googleAnalytics.sendAppView('Configuration');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var craftName = null;
|
|
|
|
|
|
|
|
var loadCraftName = function (callback) {
|
|
|
|
|
|
|
|
if (!CONFIG.name || CONFIG.name.trim() === '') {
|
|
|
|
|
|
|
|
mspHelper.getCraftName(function (name) {
|
|
|
|
|
|
|
|
craftName = name;
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
craftName = CONFIG.name;
|
|
|
|
|
|
|
|
callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var saveCraftName = function (callback) {
|
|
|
|
|
|
|
|
mspHelper.setCraftName(craftName, callback);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var loadChainer = new MSPChainerClass();
|
|
|
|
var loadChainer = new MSPChainerClass();
|
|
|
|
|
|
|
|
|
|
|
|
var loadChain = [
|
|
|
|
var loadChain = [
|
|
|
@ -40,7 +23,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|
|
|
mspHelper.loadMixerConfig,
|
|
|
|
mspHelper.loadMixerConfig,
|
|
|
|
mspHelper.loadBoardAlignment,
|
|
|
|
mspHelper.loadBoardAlignment,
|
|
|
|
mspHelper.loadCurrentMeterConfig,
|
|
|
|
mspHelper.loadCurrentMeterConfig,
|
|
|
|
loadCraftName,
|
|
|
|
|
|
|
|
mspHelper.loadMiscV2
|
|
|
|
mspHelper.loadMiscV2
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
@ -60,7 +42,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|
|
|
mspHelper.saveVTXConfig,
|
|
|
|
mspHelper.saveVTXConfig,
|
|
|
|
mspHelper.saveBoardAlignment,
|
|
|
|
mspHelper.saveBoardAlignment,
|
|
|
|
mspHelper.saveCurrentMeterConfig,
|
|
|
|
mspHelper.saveCurrentMeterConfig,
|
|
|
|
saveCraftName,
|
|
|
|
|
|
|
|
mspHelper.saveMiscV2,
|
|
|
|
mspHelper.saveMiscV2,
|
|
|
|
saveSettings,
|
|
|
|
saveSettings,
|
|
|
|
mspHelper.saveToEeprom
|
|
|
|
mspHelper.saveToEeprom
|
|
|
@ -290,15 +271,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|
|
|
$('#3ddeadbandlow').val(REVERSIBLE_MOTORS.deadband_low);
|
|
|
|
$('#3ddeadbandlow').val(REVERSIBLE_MOTORS.deadband_low);
|
|
|
|
$('#3ddeadbandhigh').val(REVERSIBLE_MOTORS.deadband_high);
|
|
|
|
$('#3ddeadbandhigh').val(REVERSIBLE_MOTORS.deadband_high);
|
|
|
|
$('#3dneutral').val(REVERSIBLE_MOTORS.neutral);
|
|
|
|
$('#3dneutral').val(REVERSIBLE_MOTORS.neutral);
|
|
|
|
|
|
|
|
|
|
|
|
// Craft name
|
|
|
|
|
|
|
|
if (craftName != null) {
|
|
|
|
|
|
|
|
$('.config-personalization').show();
|
|
|
|
|
|
|
|
$('input[name="craft_name"]').val(craftName);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// craft name not supported by the firmware
|
|
|
|
|
|
|
|
$('.config-personalization').hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('a.save').click(function () {
|
|
|
|
$('a.save').click(function () {
|
|
|
|
MISC.mag_declination = parseFloat($('#mag_declination').val());
|
|
|
|
MISC.mag_declination = parseFloat($('#mag_declination').val());
|
|
|
@ -324,8 +296,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|
|
|
|
|
|
|
|
|
|
|
SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val());
|
|
|
|
SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val());
|
|
|
|
|
|
|
|
|
|
|
|
craftName = $('input[name="craft_name"]').val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
googleAnalytics.sendEvent('Setting', 'I2CSpeed', $('#i2c_speed').children("option:selected").text());
|
|
|
|
googleAnalytics.sendEvent('Setting', 'I2CSpeed', $('#i2c_speed').children("option:selected").text());
|
|
|
|
|
|
|
|
|
|
|
|
googleAnalytics.sendEvent('Board', 'Accelerometer', $('#sensor-acc').children("option:selected").text());
|
|
|
|
googleAnalytics.sendEvent('Board', 'Accelerometer', $('#sensor-acc').children("option:selected").text());
|
|
|
|