mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Remove tabs and some trailing spaces
This commit is contained in:
parent
55df431247
commit
09e2f6d231
9 changed files with 384 additions and 393 deletions
|
@ -168,7 +168,7 @@ function configuration_backup(callback) {
|
||||||
configuration.RXFAIL_CONFIG = jQuery.extend(true, [], RXFAIL_CONFIG);
|
configuration.RXFAIL_CONFIG = jQuery.extend(true, [], RXFAIL_CONFIG);
|
||||||
}
|
}
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
||||||
configuration.RSSI_CONFIG = jQuery.extend(true, {}, RSSI_CONFIG);
|
configuration.RSSI_CONFIG = jQuery.extend(true, {}, RSSI_CONFIG);
|
||||||
configuration.FEATURE_CONFIG = jQuery.extend(true, {}, FEATURE_CONFIG);
|
configuration.FEATURE_CONFIG = jQuery.extend(true, {}, FEATURE_CONFIG);
|
||||||
configuration.MOTOR_CONFIG = jQuery.extend(true, {}, MOTOR_CONFIG);
|
configuration.MOTOR_CONFIG = jQuery.extend(true, {}, MOTOR_CONFIG);
|
||||||
configuration.GPS_CONFIG = jQuery.extend(true, {}, GPS_CONFIG);
|
configuration.GPS_CONFIG = jQuery.extend(true, {}, GPS_CONFIG);
|
||||||
|
@ -422,7 +422,6 @@ function configuration_restore(callback) {
|
||||||
configuration.LED_STRIP = fixed_led_strip;
|
configuration.LED_STRIP = fixed_led_strip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (var profileIndex = 0; profileIndex < 3; profileIndex++) {
|
for (var profileIndex = 0; profileIndex < 3; profileIndex++) {
|
||||||
var RC = configuration.profiles[profileIndex].RC;
|
var RC = configuration.profiles[profileIndex].RC;
|
||||||
// TPA breakpoint was added
|
// TPA breakpoint was added
|
||||||
|
@ -596,7 +595,6 @@ function configuration_restore(callback) {
|
||||||
if (compareVersions(migratedVersion, '0.66.0') && !compareVersions(configuration.apiVersion, '1.15.0')) {
|
if (compareVersions(migratedVersion, '0.66.0') && !compareVersions(configuration.apiVersion, '1.15.0')) {
|
||||||
// api 1.15 exposes RCdeadband and sensor alignment
|
// api 1.15 exposes RCdeadband and sensor alignment
|
||||||
|
|
||||||
|
|
||||||
for (var profileIndex = 0; profileIndex < configuration.profiles.length; profileIndex++) {
|
for (var profileIndex = 0; profileIndex < configuration.profiles.length; profileIndex++) {
|
||||||
if (configuration.profiles[profileIndex].RCdeadband == undefined) {
|
if (configuration.profiles[profileIndex].RCdeadband == undefined) {
|
||||||
configuration.profiles[profileIndex].RCdeadband = {
|
configuration.profiles[profileIndex].RCdeadband = {
|
||||||
|
@ -828,8 +826,8 @@ function configuration_restore(callback) {
|
||||||
uniqueData.push(MSPCodes.MSP_SET_FAILSAFE_CONFIG);
|
uniqueData.push(MSPCodes.MSP_SET_FAILSAFE_CONFIG);
|
||||||
}
|
}
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
||||||
uniqueData.push(MSPCodes.MSP_SET_FEATURE_CONFIG);
|
uniqueData.push(MSPCodes.MSP_SET_FEATURE_CONFIG);
|
||||||
uniqueData.push(MSPCodes.MSP_SET_MOTOR_CONFIG);
|
uniqueData.push(MSPCodes.MSP_SET_MOTOR_CONFIG);
|
||||||
uniqueData.push(MSPCodes.MSP_SET_GPS_CONFIG);
|
uniqueData.push(MSPCodes.MSP_SET_GPS_CONFIG);
|
||||||
uniqueData.push(MSPCodes.MSP_SET_COMPASS_CONFIG);
|
uniqueData.push(MSPCodes.MSP_SET_COMPASS_CONFIG);
|
||||||
uniqueData.push(MSPCodes.MSP_SET_RSSI_CONFIG);
|
uniqueData.push(MSPCodes.MSP_SET_RSSI_CONFIG);
|
||||||
|
|
|
@ -222,34 +222,34 @@ STM32DFU_protocol.prototype.getInterfaceDescriptors = function (interfaceNum, ca
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var interfaceID = 0;
|
var interfaceID = 0;
|
||||||
var descriptorStringArray = [];
|
var descriptorStringArray = [];
|
||||||
var getDescriptorString = function () {
|
var getDescriptorString = function () {
|
||||||
if(interfaceID < config.interfaces.length) {
|
if(interfaceID < config.interfaces.length) {
|
||||||
self.getInterfaceDescriptor(interfaceID, function (descriptor, resultCode) {
|
self.getInterfaceDescriptor(interfaceID, function (descriptor, resultCode) {
|
||||||
if (resultCode) {
|
if (resultCode) {
|
||||||
callback([], resultCode);
|
callback([], resultCode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
interfaceID++;
|
interfaceID++;
|
||||||
self.getString(descriptor.iInterface, function (descriptorString, resultCode) {
|
self.getString(descriptor.iInterface, function (descriptorString, resultCode) {
|
||||||
if (resultCode) {
|
if (resultCode) {
|
||||||
callback([], resultCode);
|
callback([], resultCode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (descriptor.bInterfaceNumber == interfaceNum) {
|
if (descriptor.bInterfaceNumber == interfaceNum) {
|
||||||
descriptorStringArray.push(descriptorString);
|
descriptorStringArray.push(descriptorString);
|
||||||
}
|
}
|
||||||
getDescriptorString();
|
getDescriptorString();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//console.log(descriptorStringArray);
|
//console.log(descriptorStringArray);
|
||||||
callback(descriptorStringArray, 0);
|
callback(descriptorStringArray, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getDescriptorString();
|
getDescriptorString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,11 +396,6 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) {
|
||||||
case 'K':
|
case 'K':
|
||||||
page_size *= 1024;
|
page_size *= 1024;
|
||||||
break;
|
break;
|
||||||
/* case ' ':
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sectors.push({
|
sectors.push({
|
||||||
|
@ -419,12 +414,12 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) {
|
||||||
'sectors' : sectors,
|
'sectors' : sectors,
|
||||||
'total_size' : total_size
|
'total_size' : total_size
|
||||||
}
|
}
|
||||||
return memory;
|
return memory;
|
||||||
}
|
}
|
||||||
var chipInfo = descriptors.map(parseDescriptor).reduce(function(o, v, i) {
|
var chipInfo = descriptors.map(parseDescriptor).reduce(function(o, v, i) {
|
||||||
o[v.type.toLowerCase().replace(' ', '_')] = v;
|
o[v.type.toLowerCase().replace(' ', '_')] = v;
|
||||||
return o;
|
return o;
|
||||||
}, {});
|
}, {});
|
||||||
callback(chipInfo, resultCode);
|
callback(chipInfo, resultCode);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -435,7 +430,7 @@ STM32DFU_protocol.prototype.controlTransfer = function (direction, request, valu
|
||||||
// timeout support was added in chrome v43
|
// timeout support was added in chrome v43
|
||||||
var timeout;
|
var timeout;
|
||||||
if (typeof _timeout === "undefined") {
|
if (typeof _timeout === "undefined") {
|
||||||
timeout = 0; // default is 0 (according to chrome.usb API)
|
timeout = 0; // default is 0 (according to chrome.usb API)
|
||||||
} else {
|
} else {
|
||||||
timeout = _timeout;
|
timeout = _timeout;
|
||||||
}
|
}
|
||||||
|
@ -527,11 +522,11 @@ STM32DFU_protocol.prototype.loadAddress = function (address, callback, abort) {
|
||||||
callback(data);
|
callback(data);
|
||||||
} else {
|
} else {
|
||||||
console.log('Failed to execute address load');
|
console.log('Failed to execute address load');
|
||||||
if(typeof abort === "undefined" || abort) {
|
if(typeof abort === "undefined" || abort) {
|
||||||
self.upload_procedure(99);
|
self.upload_procedure(99);
|
||||||
} else {
|
} else {
|
||||||
callback(data);
|
callback(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, delay);
|
}, delay);
|
||||||
|
@ -627,122 +622,120 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (typeof self.chipInfo.option_bytes === "undefined") {
|
if (typeof self.chipInfo.option_bytes === "undefined") {
|
||||||
console.log('Failed to detect option bytes');
|
console.log('Failed to detect option bytes');
|
||||||
self.upload_procedure(99);
|
self.upload_procedure(99);
|
||||||
}
|
}
|
||||||
|
|
||||||
var unprotect = function() {
|
var unprotect = function() {
|
||||||
console.log('Initiate read unprotect');
|
console.log('Initiate read unprotect');
|
||||||
let messageReadProtected = i18n.getMessage('stm32ReadProtected');
|
let messageReadProtected = i18n.getMessage('stm32ReadProtected');
|
||||||
GUI.log(messageReadProtected);
|
GUI.log(messageReadProtected);
|
||||||
TABS.firmware_flasher.flashingMessage(messageReadProtected, TABS.firmware_flasher.FLASH_MESSAGE_TYPES.ACTION)
|
TABS.firmware_flasher.flashingMessage(messageReadProtected, TABS.firmware_flasher.FLASH_MESSAGE_TYPES.ACTION)
|
||||||
|
|
||||||
self.controlTransfer('out', self.request.DNLOAD, 0, 0, 0, [0x92], function () { // 0x92 initiates read unprotect
|
self.controlTransfer('out', self.request.DNLOAD, 0, 0, 0, [0x92], function () { // 0x92 initiates read unprotect
|
||||||
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
||||||
if (data[4] == self.state.dfuDNBUSY) { // completely normal
|
if (data[4] == self.state.dfuDNBUSY) { // completely normal
|
||||||
var delay = data[1] | (data[2] << 8) | (data[3] << 16);
|
var delay = data[1] | (data[2] << 8) | (data[3] << 16);
|
||||||
var total_delay = delay + 20000; // wait at least 20 seconds to make sure the user does not disconnect the board while erasing the memory
|
var total_delay = delay + 20000; // wait at least 20 seconds to make sure the user does not disconnect the board while erasing the memory
|
||||||
var timeSpentWaiting = 0;
|
var timeSpentWaiting = 0;
|
||||||
var incr = 1000; // one sec increments
|
var incr = 1000; // one sec increments
|
||||||
var waitForErase = setInterval(function () {
|
var waitForErase = setInterval(function () {
|
||||||
|
|
||||||
TABS.firmware_flasher.flashProgress(Math.min(timeSpentWaiting / total_delay, 1) * 100);
|
TABS.firmware_flasher.flashProgress(Math.min(timeSpentWaiting / total_delay, 1) * 100);
|
||||||
|
|
||||||
if(timeSpentWaiting < total_delay)
|
if(timeSpentWaiting < total_delay) {
|
||||||
{
|
timeSpentWaiting += incr;
|
||||||
timeSpentWaiting += incr;
|
return;
|
||||||
return;
|
}
|
||||||
}
|
clearInterval(waitForErase);
|
||||||
clearInterval(waitForErase);
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data, error) { // should stall/disconnect
|
||||||
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data, error) { // should stall/disconnect
|
if(error) { // we encounter an error, but this is expected. should be a stall.
|
||||||
if(error) { // we encounter an error, but this is expected. should be a stall.
|
console.log('Unprotect memory command ran successfully. Unplug flight controller. Connect again in DFU mode and try flashing again.');
|
||||||
console.log('Unprotect memory command ran successfully. Unplug flight controller. Connect again in DFU mode and try flashing again.');
|
GUI.log(i18n.getMessage('stm32UnprotectSuccessful'));
|
||||||
GUI.log(i18n.getMessage('stm32UnprotectSuccessful'));
|
|
||||||
|
|
||||||
let messageUnprotectUnplug = i18n.getMessage('stm32UnprotectUnplug');
|
let messageUnprotectUnplug = i18n.getMessage('stm32UnprotectUnplug');
|
||||||
GUI.log(messageUnprotectUnplug);
|
GUI.log(messageUnprotectUnplug);
|
||||||
|
|
||||||
TABS.firmware_flasher.flashingMessage(messageUnprotectUnplug, TABS.firmware_flasher.FLASH_MESSAGE_TYPES.ACTION)
|
TABS.firmware_flasher.flashingMessage(messageUnprotectUnplug, TABS.firmware_flasher.FLASH_MESSAGE_TYPES.ACTION)
|
||||||
.flashProgress(0);
|
.flashProgress(0);
|
||||||
|
|
||||||
} else { // unprotecting the flight controller did not work. It did not reboot.
|
} else { // unprotecting the flight controller did not work. It did not reboot.
|
||||||
console.log('Failed to execute unprotect memory command');
|
console.log('Failed to execute unprotect memory command');
|
||||||
|
|
||||||
GUI.log(i18n.getMessage('stm32UnprotectFailed'));
|
GUI.log(i18n.getMessage('stm32UnprotectFailed'));
|
||||||
TABS.firmware_flasher.flashingMessage(i18n.getMessage('stm32UnprotectFailed'), TABS.firmware_flasher.FLASH_MESSAGE_TYPES.INVALID);
|
TABS.firmware_flasher.flashingMessage(i18n.getMessage('stm32UnprotectFailed'), TABS.firmware_flasher.FLASH_MESSAGE_TYPES.INVALID);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
self.upload_procedure(99);
|
self.upload_procedure(99);
|
||||||
}
|
}
|
||||||
}, 2000); // this should stall/disconnect anyways. so we only wait 2 sec max.
|
}, 2000); // this should stall/disconnect anyways. so we only wait 2 sec max.
|
||||||
}, incr);
|
}, incr);
|
||||||
} else {
|
} else {
|
||||||
console.log('Failed to initiate unprotect memory command');
|
console.log('Failed to initiate unprotect memory command');
|
||||||
let messageUnprotectInitFailed = i18n.getMessage('stm32UnprotectInitFailed')
|
let messageUnprotectInitFailed = i18n.getMessage('stm32UnprotectInitFailed')
|
||||||
GUI.log(messageUnprotectInitFailed);
|
GUI.log(messageUnprotectInitFailed);
|
||||||
TABS.firmware_flasher.flashingMessage(messageUnprotectInitFailed, TABS.firmware_flasher.FLASH_MESSAGE_TYPES.INVALID)
|
TABS.firmware_flasher.flashingMessage(messageUnprotectInitFailed, TABS.firmware_flasher.FLASH_MESSAGE_TYPES.INVALID)
|
||||||
self.upload_procedure(99);
|
self.upload_procedure(99);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tryReadOB = function() {
|
||||||
|
// the following should fail if read protection is active
|
||||||
|
self.controlTransfer('in', self.request.UPLOAD, 2, 0, self.chipInfo.option_bytes.total_size, 0, function (ob_data, errcode) {
|
||||||
|
if(errcode) {
|
||||||
|
console.log('USB transfer error while reading option bytes: ' + errcode1);
|
||||||
|
self.upload_procedure(99);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
||||||
|
if (data[4] == self.state.dfuUPLOAD_IDLE && ob_data.length == self.chipInfo.option_bytes.total_size) {
|
||||||
|
console.log('Option bytes read successfully');
|
||||||
|
console.log('Chip does not appear read protected');
|
||||||
|
GUI.log(i18n.getMessage('stm32NotReadProtected'));
|
||||||
|
// it is pretty safe to continue to erase flash
|
||||||
|
self.clearStatus(function() {
|
||||||
|
self.upload_procedure(2);
|
||||||
|
});
|
||||||
|
/* // this snippet is to protect the flash memory (only for the brave)
|
||||||
|
ob_data[1] = 0x0;
|
||||||
|
var writeOB = function() {
|
||||||
|
self.controlTransfer('out', self.request.DNLOAD, 2, 0, 0, ob_data, function () {
|
||||||
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
||||||
|
if (data[4] == self.state.dfuDNBUSY) {
|
||||||
|
var delay = data[1] | (data[2] << 8) | (data[3] << 16);
|
||||||
|
|
||||||
var tryReadOB = function() {
|
setTimeout(function () {
|
||||||
// the following should fail if read protection is active
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
||||||
self.controlTransfer('in', self.request.UPLOAD, 2, 0, self.chipInfo.option_bytes.total_size, 0, function (ob_data, errcode) {
|
if (data[4] == self.state.dfuDNLOAD_IDLE) {
|
||||||
if(errcode) {
|
console.log('Failed to write ob');
|
||||||
console.log('USB transfer error while reading option bytes: ' + errcode1);
|
self.upload_procedure(99);
|
||||||
self.upload_procedure(99);
|
} else {
|
||||||
return;
|
console.log('Success writing ob');
|
||||||
}
|
self.upload_procedure(99);
|
||||||
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
}
|
||||||
if (data[4] == self.state.dfuUPLOAD_IDLE && ob_data.length == self.chipInfo.option_bytes.total_size) {
|
});
|
||||||
console.log('Option bytes read successfully');
|
}, delay);
|
||||||
console.log('Chip does not appear read protected');
|
} else {
|
||||||
GUI.log(i18n.getMessage('stm32NotReadProtected'));
|
console.log('Failed to initiate write ob');
|
||||||
// it is pretty safe to continue to erase flash
|
self.upload_procedure(99);
|
||||||
self.clearStatus(function() {
|
}
|
||||||
self.upload_procedure(2);
|
});
|
||||||
});
|
});
|
||||||
/* // this snippet is to protect the flash memory (only for the brave)
|
}
|
||||||
ob_data[1] = 0x0;
|
self.clearStatus(function () {
|
||||||
var writeOB = function() {
|
self.loadAddress(self.chipInfo.option_bytes.start_address, function () {
|
||||||
self.controlTransfer('out', self.request.DNLOAD, 2, 0, 0, ob_data, function () {
|
self.clearStatus(writeOB);
|
||||||
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
});
|
||||||
if (data[4] == self.state.dfuDNBUSY) {
|
}); // */
|
||||||
var delay = data[1] | (data[2] << 8) | (data[3] << 16);
|
} else {
|
||||||
|
console.log('Option bytes could not be read. Quite possibly read protected.');
|
||||||
setTimeout(function () {
|
self.clearStatus(unprotect);
|
||||||
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
}
|
||||||
if (data[4] == self.state.dfuDNLOAD_IDLE) {
|
});
|
||||||
console.log('Failed to write ob');
|
});
|
||||||
self.upload_procedure(99);
|
}
|
||||||
} else {
|
|
||||||
console.log('Success writing ob');
|
|
||||||
self.upload_procedure(99);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, delay);
|
|
||||||
} else {
|
|
||||||
console.log('Failed to initiate write ob');
|
|
||||||
self.upload_procedure(99);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
self.clearStatus(function () {
|
|
||||||
self.loadAddress(self.chipInfo.option_bytes.start_address, function () {
|
|
||||||
self.clearStatus(writeOB);
|
|
||||||
});
|
|
||||||
}); // */
|
|
||||||
} else {
|
|
||||||
console.log('Option bytes could not be read. Quite possibly read protected.');
|
|
||||||
self.clearStatus(unprotect);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var initReadOB = function (loadAddressResponse) {
|
var initReadOB = function (loadAddressResponse) {
|
||||||
// contrary to what is in the docs. Address load should in theory work even if read protection is active
|
// contrary to what is in the docs. Address load should in theory work even if read protection is active
|
||||||
|
@ -761,10 +754,10 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.clearStatus(function () {
|
self.clearStatus(function () {
|
||||||
// load address fails if read protection is active unlike as stated in the docs
|
// load address fails if read protection is active unlike as stated in the docs
|
||||||
self.loadAddress(self.chipInfo.option_bytes.start_address, initReadOB, false);
|
self.loadAddress(self.chipInfo.option_bytes.start_address, initReadOB, false);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// erase
|
// erase
|
||||||
|
|
|
@ -76,7 +76,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
} else {
|
} else {
|
||||||
$('div.release_info #manufacturerInfo').hide();
|
$('div.release_info #manufacturerInfo').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('div.release_info .target').text(targetName);
|
$('div.release_info .target').text(targetName);
|
||||||
$('div.release_info .name').text(summary.version).prop('href', summary.releaseUrl);
|
$('div.release_info .name').text(summary.version).prop('href', summary.releaseUrl);
|
||||||
$('div.release_info .date').text(summary.date);
|
$('div.release_info .date').text(summary.date);
|
||||||
|
|
|
@ -869,8 +869,8 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
|
||||||
// set mode colors visibility
|
// set mode colors visibility
|
||||||
|
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.20.0"))
|
if (semver.gte(CONFIG.apiVersion, "1.20.0"))
|
||||||
if (activeFunction == "function-f")
|
if (activeFunction == "function-f")
|
||||||
$('.mode_colors').show();
|
$('.mode_colors').show();
|
||||||
|
|
||||||
// set special colors visibility
|
// set special colors visibility
|
||||||
$('.special_colors').show();
|
$('.special_colors').show();
|
||||||
|
|
|
@ -1083,7 +1083,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
if (!semver.gte(CONFIG.apiVersion, "1.16.0")) {
|
if (!semver.gte(CONFIG.apiVersion, "1.16.0")) {
|
||||||
$('#pid-tuning .delta').hide();
|
$('#pid-tuning .delta').hide();
|
||||||
$('.tab-pid_tuning .note').hide();
|
$('.tab-pid_tuning .note').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a name to each row of PIDs if empty
|
// Add a name to each row of PIDs if empty
|
||||||
$('.pid_tuning tr').each(function(){
|
$('.pid_tuning tr').each(function(){
|
||||||
|
|
|
@ -440,11 +440,11 @@ TABS.power.initialize = function (callback) {
|
||||||
$('a.applycalibration').click(function() {
|
$('a.applycalibration').click(function() {
|
||||||
if (vbatscalechanged) {
|
if (vbatscalechanged) {
|
||||||
self.analyticsChanges['PowerVBatUpdated'] = 'Calibrated';
|
self.analyticsChanges['PowerVBatUpdated'] = 'Calibrated';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amperagescalechanged) {
|
if (amperagescalechanged) {
|
||||||
self.analyticsChanges['PowerAmperageUpdated'] = 'Calibrated';
|
self.analyticsChanges['PowerAmperageUpdated'] = 'Calibrated';
|
||||||
}
|
}
|
||||||
|
|
||||||
calibrationconfirmed = true;
|
calibrationconfirmed = true;
|
||||||
GUI.calibrationManagerConfirmation.close();
|
GUI.calibrationManagerConfirmation.close();
|
||||||
|
|
|
@ -39,9 +39,9 @@ TABS.setup.initialize = function (callback) {
|
||||||
// initialize 3D Model
|
// initialize 3D Model
|
||||||
self.initModel();
|
self.initModel();
|
||||||
|
|
||||||
// set roll in interactive block
|
// set roll in interactive block
|
||||||
$('span.roll').text(i18n.getMessage('initialSetupAttitude', [0]));
|
$('span.roll').text(i18n.getMessage('initialSetupAttitude', [0]));
|
||||||
// set pitch in interactive block
|
// set pitch in interactive block
|
||||||
$('span.pitch').text(i18n.getMessage('initialSetupAttitude', [0]));
|
$('span.pitch').text(i18n.getMessage('initialSetupAttitude', [0]));
|
||||||
// set heading in interactive block
|
// set heading in interactive block
|
||||||
$('span.heading').text(i18n.getMessage('initialSetupAttitude', [0]));
|
$('span.heading').text(i18n.getMessage('initialSetupAttitude', [0]));
|
||||||
|
@ -300,8 +300,8 @@ TABS.setup.initialize = function (callback) {
|
||||||
|
|
||||||
function get_fast_data() {
|
function get_fast_data() {
|
||||||
MSP.send_message(MSPCodes.MSP_ATTITUDE, false, false, function () {
|
MSP.send_message(MSPCodes.MSP_ATTITUDE, false, false, function () {
|
||||||
roll_e.text(i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[0]]));
|
roll_e.text(i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[0]]));
|
||||||
pitch_e.text(i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[1]]));
|
pitch_e.text(i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[1]]));
|
||||||
heading_e.text(i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[2]]));
|
heading_e.text(i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[2]]));
|
||||||
|
|
||||||
self.renderModel();
|
self.renderModel();
|
||||||
|
|
|
@ -37,73 +37,73 @@ TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
'ID 9': 'E083BFF00F9E38C0FF',
|
'ID 9': 'E083BFF00F9E38C0FF',
|
||||||
}
|
}
|
||||||
}, //arcitimer
|
}, //arcitimer
|
||||||
3: {
|
3: {
|
||||||
dataType: dataTypes.LIST, // <select>...</select>
|
dataType: dataTypes.LIST, // <select>...</select>
|
||||||
dataOptions: {
|
dataOptions: {
|
||||||
'0':'00',
|
'0':'00',
|
||||||
'1':'01',
|
'1':'01',
|
||||||
'2':'02',
|
'2':'02',
|
||||||
'3':'03',
|
'3':'03',
|
||||||
'4':'04',
|
'4':'04',
|
||||||
'5':'05',
|
'5':'05',
|
||||||
'6':'06',
|
'6':'06',
|
||||||
'7':'07',
|
'7':'07',
|
||||||
'8':'08',
|
'8':'08',
|
||||||
'9':'09',
|
'9':'09',
|
||||||
'10':'0A',
|
'10':'0A',
|
||||||
'11':'0B',
|
'11':'0B',
|
||||||
'12':'0C',
|
'12':'0C',
|
||||||
'13':'0D',
|
'13':'0D',
|
||||||
'14':'0E',
|
'14':'0E',
|
||||||
'15':'0F',
|
'15':'0F',
|
||||||
'16':'10',
|
'16':'10',
|
||||||
'17':'11',
|
'17':'11',
|
||||||
'18':'12',
|
'18':'12',
|
||||||
'19':'13',
|
'19':'13',
|
||||||
'20':'14',
|
'20':'14',
|
||||||
'21':'15',
|
'21':'15',
|
||||||
'22':'16',
|
'22':'16',
|
||||||
'23':'17',
|
'23':'17',
|
||||||
'24':'18',
|
'24':'18',
|
||||||
'25':'19',
|
'25':'19',
|
||||||
'26':'1A',
|
'26':'1A',
|
||||||
'27':'1B',
|
'27':'1B',
|
||||||
'28':'1C',
|
'28':'1C',
|
||||||
'29':'1D',
|
'29':'1D',
|
||||||
'30':'1E',
|
'30':'1E',
|
||||||
'31':'1F',
|
'31':'1F',
|
||||||
'32':'20',
|
'32':'20',
|
||||||
'33':'21',
|
'33':'21',
|
||||||
'34':'22',
|
'34':'22',
|
||||||
'35':'23',
|
'35':'23',
|
||||||
'36':'24',
|
'36':'24',
|
||||||
'37':'25',
|
'37':'25',
|
||||||
'38':'26',
|
'38':'26',
|
||||||
'39':'27',
|
'39':'27',
|
||||||
'40':'28',
|
'40':'28',
|
||||||
'41':'29',
|
'41':'29',
|
||||||
'42':'2A',
|
'42':'2A',
|
||||||
'43':'2B',
|
'43':'2B',
|
||||||
'44':'2C',
|
'44':'2C',
|
||||||
'45':'2D',
|
'45':'2D',
|
||||||
'46':'2E',
|
'46':'2E',
|
||||||
'47':'2F',
|
'47':'2F',
|
||||||
'48':'30',
|
'48':'30',
|
||||||
'49':'31',
|
'49':'31',
|
||||||
'50':'32',
|
'50':'32',
|
||||||
'51':'33',
|
'51':'33',
|
||||||
'52':'34',
|
'52':'34',
|
||||||
'53':'35',
|
'53':'35',
|
||||||
'54':'36',
|
'54':'36',
|
||||||
'55':'37',
|
'55':'37',
|
||||||
'56':'38',
|
'56':'38',
|
||||||
'57':'39',
|
'57':'39',
|
||||||
'58':'3A',
|
'58':'3A',
|
||||||
'59':'3B',
|
'59':'3B',
|
||||||
'60':'3C',
|
'60':'3C',
|
||||||
'61':'3D',
|
'61':'3D',
|
||||||
'62':'3E',
|
'62':'3E',
|
||||||
'63':'3F',
|
'63':'3F',
|
||||||
}
|
}
|
||||||
}, //ERLT
|
}, //ERLT
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue