mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-15 04:15:32 +03:00
Merge pull request #2693 from chmelevskij/chore/eslint-trailing-comma
chore: add comman dangle rule for multiline
This commit is contained in:
commit
c09d64b9b2
43 changed files with 203 additions and 202 deletions
11
.eslintrc.js
11
.eslintrc.js
|
@ -1,7 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 2020,
|
ecmaVersion: 2020,
|
||||||
sourceType: "module"
|
sourceType: "module",
|
||||||
},
|
},
|
||||||
extends: ["plugin:vue/recommended"],
|
extends: ["plugin:vue/recommended"],
|
||||||
env: {
|
env: {
|
||||||
|
@ -9,11 +9,12 @@ module.exports = {
|
||||||
jquery: true,
|
jquery: true,
|
||||||
es2017: true,
|
es2017: true,
|
||||||
browser: true,
|
browser: true,
|
||||||
webextensions: true
|
webextensions: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
"no-trailing-spaces": "error",
|
"no-trailing-spaces": "error",
|
||||||
"eol-last": "error",
|
"eol-last": "error",
|
||||||
semi: "error"
|
semi: "error",
|
||||||
}
|
"comma-dangle": ["error", "always-multiline"],
|
||||||
}
|
},
|
||||||
|
};
|
||||||
|
|
|
@ -424,7 +424,7 @@ function dist_rollup() {
|
||||||
// accordingly inside of `dist`
|
// accordingly inside of `dist`
|
||||||
entryFileNames: '[name].js',
|
entryFileNames: '[name].js',
|
||||||
dir: DIST_DIR,
|
dir: DIST_DIR,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -559,7 +559,7 @@ function injectARMCache(flavor, done) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
done();
|
done();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -828,7 +828,7 @@ function release_osx64(appDirectory) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,8 +231,8 @@ class MotorOutputReorderConfig
|
||||||
ArmWidth: 0.1 * screenSize,
|
ArmWidth: 0.1 * screenSize,
|
||||||
Motors:
|
Motors:
|
||||||
[
|
[
|
||||||
{x: -frameRadius, y: 0,},
|
{x: -frameRadius, y: 0},
|
||||||
{x: frameRadius, y: 0,},
|
{x: frameRadius, y: 0},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ const Analytics = function (trackingId, userId, appName, appVersion, gitRevision
|
||||||
this._googleAnalytics.initialize(this._trackingId, {
|
this._googleAnalytics.initialize(this._trackingId, {
|
||||||
storage: 'none',
|
storage: 'none',
|
||||||
clientId: userId,
|
clientId: userId,
|
||||||
debug: !!debugMode
|
debug: !!debugMode,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Make it work for the Chrome App:
|
// Make it work for the Chrome App:
|
||||||
|
|
|
@ -30,13 +30,13 @@ class Beepers {
|
||||||
beepers.push(
|
beepers.push(
|
||||||
{ bit: 19, name: 'CRASH_FLIP', visible: true },
|
{ bit: 19, name: 'CRASH_FLIP', visible: true },
|
||||||
{ bit: 20, name: 'CAM_CONNECTION_OPEN', visible: true },
|
{ bit: 20, name: 'CAM_CONNECTION_OPEN', visible: true },
|
||||||
{ bit: 21, name: 'CAM_CONNECTION_CLOSE', visible: true }
|
{ bit: 21, name: 'CAM_CONNECTION_CLOSE', visible: true },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(config.apiVersion, API_VERSION_1_39)) {
|
if (semver.gte(config.apiVersion, API_VERSION_1_39)) {
|
||||||
beepers.push(
|
beepers.push(
|
||||||
{ bit: 22, name: 'RC_SMOOTHING_INIT_FAIL', visible: true }
|
{ bit: 22, name: 'RC_SMOOTHING_INIT_FAIL', visible: true },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ CliAutoComplete._initTextcomplete = function() {
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.on('textComplete:show', function() {
|
.on('textComplete:show', function() {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,7 +10,7 @@ const Clipboard = {
|
||||||
readAvailable : null,
|
readAvailable : null,
|
||||||
writeAvailable : null,
|
writeAvailable : null,
|
||||||
writeText : null,
|
writeText : null,
|
||||||
readText : null
|
readText : null,
|
||||||
};
|
};
|
||||||
|
|
||||||
Clipboard._configureClipboardAsNwJs = function(nwGui) {
|
Clipboard._configureClipboardAsNwJs = function(nwGui) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ function seek(firmware, address) {
|
||||||
for (; index < firmware.data.length && address >= firmware.data[index].address + firmware.data[index].bytes; index++);
|
for (; index < firmware.data.length && address >= firmware.data[index].address + firmware.data[index].bytes; index++);
|
||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
lineIndex: index
|
lineIndex: index,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (firmware.data[index] && address >= firmware.data[index].address) {
|
if (firmware.data[index] && address >= firmware.data[index].address) {
|
||||||
|
@ -67,7 +67,7 @@ function generateData(firmware, input, startAddress) {
|
||||||
const line = {
|
const line = {
|
||||||
address: address,
|
address: address,
|
||||||
bytes: BLOCK_SIZE > remaining ? remaining : BLOCK_SIZE,
|
bytes: BLOCK_SIZE > remaining ? remaining : BLOCK_SIZE,
|
||||||
data: []
|
data: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
if (firmware.data[index.lineIndex] && (line.address + line.bytes) > firmware.data[index.lineIndex].address) {
|
if (firmware.data[index.lineIndex] && (line.address + line.bytes) > firmware.data[index.lineIndex].address) {
|
||||||
|
|
|
@ -38,5 +38,5 @@ const ConfigStorage = {
|
||||||
tmpObj[element] = input[element];
|
tmpObj[element] = input[element];
|
||||||
window.localStorage.setItem(element, JSON.stringify(tmpObj));
|
window.localStorage.setItem(element, JSON.stringify(tmpObj));
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,59 +18,59 @@ const Features = function (config) {
|
||||||
{bit: 14, group: 'rxMode', mode: 'select', name: 'RX_MSP'},
|
{bit: 14, group: 'rxMode', mode: 'select', name: 'RX_MSP'},
|
||||||
{bit: 15, group: 'rssi', name: 'RSSI_ADC'},
|
{bit: 15, group: 'rssi', name: 'RSSI_ADC'},
|
||||||
{bit: 16, group: 'other', name: 'LED_STRIP'},
|
{bit: 16, group: 'other', name: 'LED_STRIP'},
|
||||||
{bit: 17, group: 'other', name: 'DISPLAY', haveTip: true}
|
{bit: 17, group: 'other', name: 'DISPLAY', haveTip: true},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!semver.gte(config.apiVersion, API_VERSION_1_33)) {
|
if (!semver.gte(config.apiVersion, API_VERSION_1_33)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true}
|
{bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(config.apiVersion, "1.12.0")) {
|
if (semver.gte(config.apiVersion, "1.12.0")) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 20, group: 'other', name: 'CHANNEL_FORWARDING'}
|
{bit: 20, group: 'other', name: 'CHANNEL_FORWARDING'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.15.0") && !semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36)) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.15.0") && !semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 8, group: 'rxFailsafe', name: 'FAILSAFE', haveTip: true}
|
{bit: 8, group: 'rxFailsafe', name: 'FAILSAFE', haveTip: true},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 21, group: 'other', name: 'TRANSPONDER', haveTip: true}
|
{bit: 21, group: 'other', name: 'TRANSPONDER', haveTip: true},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.flightControllerVersion !== '') {
|
if (config.flightControllerVersion !== '') {
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 22, group: 'other', name: 'AIRMODE'}
|
{bit: 22, group: 'other', name: 'AIRMODE'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) {
|
||||||
if (semver.lt(FC.CONFIG.apiVersion, "1.20.0")) {
|
if (semver.lt(FC.CONFIG.apiVersion, "1.20.0")) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 23, group: 'superexpoRates', name: 'SUPEREXPO_RATES'}
|
{bit: 23, group: 'superexpoRates', name: 'SUPEREXPO_RATES'},
|
||||||
);
|
);
|
||||||
} else if (!semver.gte(config.apiVersion, API_VERSION_1_33)) {
|
} else if (!semver.gte(config.apiVersion, API_VERSION_1_33)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 23, group: 'other', name: 'SDCARD'}
|
{bit: 23, group: 'other', name: 'SDCARD'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.20.0")) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.20.0")) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 18, group: 'other', name: 'OSD'}
|
{bit: 18, group: 'other', name: 'OSD'},
|
||||||
);
|
);
|
||||||
if (!semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_35)) {
|
if (!semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_35)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 24, group: 'other', name: 'VTX'}
|
{bit: 24, group: 'other', name: 'VTX'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,17 +78,17 @@ const Features = function (config) {
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_31)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_31)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 25, group: 'rxMode', mode: 'select', name: 'RX_SPI'},
|
{bit: 25, group: 'rxMode', mode: 'select', name: 'RX_SPI'},
|
||||||
{bit: 27, group: 'escSensor', name: 'ESC_SENSOR'}
|
{bit: 27, group: 'escSensor', name: 'ESC_SENSOR'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 28, group: 'antiGravity', name: 'ANTI_GRAVITY', haveTip: true, hideName: true}
|
{bit: 28, group: 'antiGravity', name: 'ANTI_GRAVITY', haveTip: true, hideName: true},
|
||||||
);
|
);
|
||||||
if (semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_44)) { // DYNAMIC_FILTER got removed from FEATURES in BF 4.3 / API 1.44
|
if (semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_44)) { // DYNAMIC_FILTER got removed from FEATURES in BF 4.3 / API 1.44
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 29, group: 'other', name: 'DYNAMIC_FILTER'}
|
{bit: 29, group: 'other', name: 'DYNAMIC_FILTER'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ const Features = function (config) {
|
||||||
if (!semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36)) {
|
if (!semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36)) {
|
||||||
features.push(
|
features.push(
|
||||||
{bit: 1, group: 'batteryVoltage', name: 'VBAT'},
|
{bit: 1, group: 'batteryVoltage', name: 'VBAT'},
|
||||||
{bit: 11, group: 'batteryCurrent', name: 'CURRENT_METER'}
|
{bit: 11, group: 'batteryCurrent', name: 'CURRENT_METER'},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,7 +268,7 @@ LogoManager.replaceLogoInFont = function (img) {
|
||||||
x * this.font.constants.SIZES.CHAR_WIDTH,
|
x * this.font.constants.SIZES.CHAR_WIDTH,
|
||||||
y * this.font.constants.SIZES.CHAR_HEIGHT,
|
y * this.font.constants.SIZES.CHAR_HEIGHT,
|
||||||
this.font.constants.SIZES.CHAR_WIDTH,
|
this.font.constants.SIZES.CHAR_WIDTH,
|
||||||
this.font.constants.SIZES.CHAR_HEIGHT
|
this.font.constants.SIZES.CHAR_HEIGHT,
|
||||||
),
|
),
|
||||||
newChar = imageToCharacter.apply(this, [imageData.data]);
|
newChar = imageToCharacter.apply(this, [imageData.data]);
|
||||||
replaceChar.apply(this, [newChar, charAddr]);
|
replaceChar.apply(this, [newChar, charAddr]);
|
||||||
|
|
|
@ -24,7 +24,7 @@ function configuration_backup(callback) {
|
||||||
MSPCodes.MSP_ACC_TRIM,
|
MSPCodes.MSP_ACC_TRIM,
|
||||||
MSPCodes.MSP_SERVO_CONFIGURATIONS,
|
MSPCodes.MSP_SERVO_CONFIGURATIONS,
|
||||||
MSPCodes.MSP_MODE_RANGES,
|
MSPCodes.MSP_MODE_RANGES,
|
||||||
MSPCodes.MSP_ADJUSTMENT_RANGES
|
MSPCodes.MSP_ADJUSTMENT_RANGES,
|
||||||
];
|
];
|
||||||
|
|
||||||
function update_profile_specific_data_list() {
|
function update_profile_specific_data_list() {
|
||||||
|
@ -71,7 +71,7 @@ function configuration_backup(callback) {
|
||||||
'ServoConfig': jQuery.extend(true, [], FC.SERVO_CONFIG),
|
'ServoConfig': jQuery.extend(true, [], FC.SERVO_CONFIG),
|
||||||
'ServoRules': jQuery.extend(true, [], FC.SERVO_RULES),
|
'ServoRules': jQuery.extend(true, [], FC.SERVO_RULES),
|
||||||
'ModeRanges': jQuery.extend(true, [], FC.MODE_RANGES),
|
'ModeRanges': jQuery.extend(true, [], FC.MODE_RANGES),
|
||||||
'AdjustmentRanges': jQuery.extend(true, [], FC.ADJUSTMENT_RANGES)
|
'AdjustmentRanges': jQuery.extend(true, [], FC.ADJUSTMENT_RANGES),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.15.0")) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.15.0")) {
|
||||||
|
@ -96,7 +96,7 @@ function configuration_backup(callback) {
|
||||||
MSPCodes.MSP_RX_MAP,
|
MSPCodes.MSP_RX_MAP,
|
||||||
MSPCodes.MSP_CF_SERIAL_CONFIG,
|
MSPCodes.MSP_CF_SERIAL_CONFIG,
|
||||||
MSPCodes.MSP_LED_STRIP_CONFIG,
|
MSPCodes.MSP_LED_STRIP_CONFIG,
|
||||||
MSPCodes.MSP_LED_COLORS
|
MSPCodes.MSP_LED_COLORS,
|
||||||
];
|
];
|
||||||
|
|
||||||
function update_unique_data_list() {
|
function update_unique_data_list() {
|
||||||
|
@ -211,7 +211,7 @@ function configuration_backup(callback) {
|
||||||
const filename = generateFilename(prefix, suffix);
|
const filename = generateFilename(prefix, suffix);
|
||||||
|
|
||||||
const accepts = [{
|
const accepts = [{
|
||||||
description: suffix.toUpperCase() + ' files', extensions: [suffix]
|
description: suffix.toUpperCase() + ' files', extensions: [suffix],
|
||||||
}];
|
}];
|
||||||
|
|
||||||
// create or load the file
|
// create or load the file
|
||||||
|
@ -282,7 +282,7 @@ function configuration_restore(callback) {
|
||||||
let chosenFileEntry = null;
|
let chosenFileEntry = null;
|
||||||
|
|
||||||
const accepts = [{
|
const accepts = [{
|
||||||
description: 'JSON files', extensions: ['json']
|
description: 'JSON files', extensions: ['json'],
|
||||||
}];
|
}];
|
||||||
|
|
||||||
// load up the file
|
// load up the file
|
||||||
|
@ -396,7 +396,7 @@ function configuration_restore(callback) {
|
||||||
if (!configuration.PIDs && configuration.PID) {
|
if (!configuration.PIDs && configuration.PID) {
|
||||||
configuration.PIDs = configuration.PID;
|
configuration.PIDs = configuration.PID;
|
||||||
configuration.PID = {
|
configuration.PID = {
|
||||||
controller: 0 // assume pid controller 0 was used.
|
controller: 0, // assume pid controller 0 was used.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ function configuration_restore(callback) {
|
||||||
ports.push(newPort);
|
ports.push(newPort);
|
||||||
}
|
}
|
||||||
configuration.SERIAL_CONFIG = {
|
configuration.SERIAL_CONFIG = {
|
||||||
ports: ports
|
ports: ports,
|
||||||
};
|
};
|
||||||
|
|
||||||
GUI.log(i18n.getMessage('configMigratedTo', [migratedVersion]));
|
GUI.log(i18n.getMessage('configMigratedTo', [migratedVersion]));
|
||||||
|
@ -496,14 +496,14 @@ function configuration_restore(callback) {
|
||||||
|
|
||||||
if (configuration.FC_CONFIG == undefined) {
|
if (configuration.FC_CONFIG == undefined) {
|
||||||
configuration.FC_CONFIG = {
|
configuration.FC_CONFIG = {
|
||||||
loopTime: 3500
|
loopTime: 3500,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configuration.ARMING_CONFIG == undefined) {
|
if (configuration.ARMING_CONFIG == undefined) {
|
||||||
configuration.ARMING_CONFIG = {
|
configuration.ARMING_CONFIG = {
|
||||||
auto_disarm_delay: 5,
|
auto_disarm_delay: 5,
|
||||||
disarm_kill_switch: 1
|
disarm_kill_switch: 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ function configuration_restore(callback) {
|
||||||
deadband3d_low: 1406,
|
deadband3d_low: 1406,
|
||||||
deadband3d_high: 1514,
|
deadband3d_high: 1514,
|
||||||
neutral: 1460,
|
neutral: 1460,
|
||||||
deadband3d_throttle: 50
|
deadband3d_throttle: 50,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ function configuration_restore(callback) {
|
||||||
configuration.SENSOR_ALIGNMENT = {
|
configuration.SENSOR_ALIGNMENT = {
|
||||||
align_gyro: 0,
|
align_gyro: 0,
|
||||||
align_acc: 0,
|
align_acc: 0,
|
||||||
align_mag: 0
|
align_mag: 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ function configuration_restore(callback) {
|
||||||
stick_min: 1100,
|
stick_min: 1100,
|
||||||
stick_max: 1900,
|
stick_max: 1900,
|
||||||
rx_min_usec: 885,
|
rx_min_usec: 885,
|
||||||
rx_max_usec: 2115
|
rx_max_usec: 2115,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,7 +628,7 @@ function configuration_restore(callback) {
|
||||||
failsafe_throttle: 1000,
|
failsafe_throttle: 1000,
|
||||||
failsafe_switch_mode: 0,
|
failsafe_switch_mode: 0,
|
||||||
failsafe_throttle_low_delay: 100,
|
failsafe_throttle_low_delay: 100,
|
||||||
failsafe_procedure: 0
|
failsafe_procedure: 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,13 +637,13 @@ function configuration_restore(callback) {
|
||||||
{mode: 0, value: 1500},
|
{mode: 0, value: 1500},
|
||||||
{mode: 0, value: 1500},
|
{mode: 0, value: 1500},
|
||||||
{mode: 0, value: 1500},
|
{mode: 0, value: 1500},
|
||||||
{mode: 0, value: 875}
|
{mode: 0, value: 875},
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let i = 0; i < 14; i++) {
|
for (let i = 0; i < 14; i++) {
|
||||||
const rxfailChannel = {
|
const rxfailChannel = {
|
||||||
mode: 1,
|
mode: 1,
|
||||||
value: 1500
|
value: 1500,
|
||||||
};
|
};
|
||||||
configuration.RXFAIL_CONFIG.push(rxfailChannel);
|
configuration.RXFAIL_CONFIG.push(rxfailChannel);
|
||||||
}
|
}
|
||||||
|
@ -698,7 +698,7 @@ function configuration_restore(callback) {
|
||||||
MSPCodes.MSP_SET_PID_CONTROLLER,
|
MSPCodes.MSP_SET_PID_CONTROLLER,
|
||||||
MSPCodes.MSP_SET_PID,
|
MSPCodes.MSP_SET_PID,
|
||||||
MSPCodes.MSP_SET_RC_TUNING,
|
MSPCodes.MSP_SET_RC_TUNING,
|
||||||
MSPCodes.MSP_SET_ACC_TRIM
|
MSPCodes.MSP_SET_ACC_TRIM,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, "1.15.0")) {
|
if (semver.gte(FC.CONFIG.apiVersion, "1.15.0")) {
|
||||||
|
@ -772,7 +772,7 @@ function configuration_restore(callback) {
|
||||||
const defaultModeRangeExtra = {
|
const defaultModeRangeExtra = {
|
||||||
modeId: FC.MODE_RANGES[modeIndex].modeId,
|
modeId: FC.MODE_RANGES[modeIndex].modeId,
|
||||||
modeLogic: 0,
|
modeLogic: 0,
|
||||||
linkedTo: 0
|
linkedTo: 0,
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES_EXTRA.push(defaultModeRangeExtra);
|
FC.MODE_RANGES_EXTRA.push(defaultModeRangeExtra);
|
||||||
}
|
}
|
||||||
|
@ -797,7 +797,7 @@ function configuration_restore(callback) {
|
||||||
|
|
||||||
const uniqueData = [
|
const uniqueData = [
|
||||||
MSPCodes.MSP_SET_RX_MAP,
|
MSPCodes.MSP_SET_RX_MAP,
|
||||||
MSPCodes.MSP_SET_CF_SERIAL_CONFIG
|
MSPCodes.MSP_SET_CF_SERIAL_CONFIG,
|
||||||
];
|
];
|
||||||
|
|
||||||
function update_unique_data_list() {
|
function update_unique_data_list() {
|
||||||
|
|
|
@ -78,7 +78,7 @@ const BOARD_DEFINITIONS = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const DEFAULT_BOARD_DEFINITION = {
|
const DEFAULT_BOARD_DEFINITION = {
|
||||||
name: "Unknown", identifier: "????", vcp: false
|
name: "Unknown", identifier: "????", vcp: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const BOARD = {};
|
const BOARD = {};
|
||||||
|
|
|
@ -94,7 +94,7 @@ JenkinsLoader.prototype.loadBuilds = function (jobName, callback) {
|
||||||
number: build.number,
|
number: build.number,
|
||||||
artifacts: build.artifacts.map(artifact => artifact.relativePath),
|
artifacts: build.artifacts.map(artifact => artifact.relativePath),
|
||||||
changes: build.changeSet.items.map(item => `* ${item.msg}`).join('<br>\n'),
|
changes: build.changeSet.items.map(item => `* ${item.msg}`).join('<br>\n'),
|
||||||
timestamp: build.timestamp
|
timestamp: build.timestamp,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// cache loaded info
|
// cache loaded info
|
||||||
|
@ -148,7 +148,7 @@ JenkinsLoader.prototype._parseBuilds = function (jobUrl, jobName, builds, callba
|
||||||
'file' : relativePath.split('/').slice(-1)[0],
|
'file' : relativePath.split('/').slice(-1)[0],
|
||||||
'target' : target,
|
'target' : target,
|
||||||
'date' : formattedDate,
|
'date' : formattedDate,
|
||||||
'notes' : build.changes
|
'notes' : build.changes,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (targetBuilds[target]) {
|
if (targetBuilds[target]) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ function appReady() {
|
||||||
function checkSetupAnalytics(callback) {
|
function checkSetupAnalytics(callback) {
|
||||||
if (!analytics) {
|
if (!analytics) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ConfigStorage.get(['userId', 'analyticsOptOut', 'checkForConfiguratorUnstableVersions', ], function (result) {
|
ConfigStorage.get(['userId', 'analyticsOptOut', 'checkForConfiguratorUnstableVersions' ], function (result) {
|
||||||
if (!analytics) {
|
if (!analytics) {
|
||||||
setupAnalytics(result);
|
setupAnalytics(result);
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ function startProcess() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
i18n.getMessage('cordovaExitAppTitle'),
|
i18n.getMessage('cordovaExitAppTitle'),
|
||||||
[i18n.getMessage('yes'),i18n.getMessage('no')]
|
[i18n.getMessage('yes'),i18n.getMessage('no')],
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -305,27 +305,27 @@ function startProcess() {
|
||||||
switch (tab) {
|
switch (tab) {
|
||||||
case 'landing':
|
case 'landing':
|
||||||
import("./tabs/landing").then(({ landing }) =>
|
import("./tabs/landing").then(({ landing }) =>
|
||||||
landing.initialize(content_ready)
|
landing.initialize(content_ready),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'changelog':
|
case 'changelog':
|
||||||
import("./tabs/static_tab").then(({ staticTab }) =>
|
import("./tabs/static_tab").then(({ staticTab }) =>
|
||||||
staticTab.initialize("changelog", content_ready)
|
staticTab.initialize("changelog", content_ready),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'privacy_policy':
|
case 'privacy_policy':
|
||||||
import("./tabs/static_tab").then(({ staticTab }) =>
|
import("./tabs/static_tab").then(({ staticTab }) =>
|
||||||
staticTab.initialize("privacy_policy", content_ready)
|
staticTab.initialize("privacy_policy", content_ready),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'options':
|
case 'options':
|
||||||
import("./tabs/options").then(({ options }) =>
|
import("./tabs/options").then(({ options }) =>
|
||||||
options.initialize(content_ready)
|
options.initialize(content_ready),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'firmware_flasher':
|
case 'firmware_flasher':
|
||||||
import("./tabs/firmware_flasher").then(({ firmware_flasher }) =>
|
import("./tabs/firmware_flasher").then(({ firmware_flasher }) =>
|
||||||
firmware_flasher.initialize(content_ready)
|
firmware_flasher.initialize(content_ready),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'help':
|
case 'help':
|
||||||
|
|
|
@ -389,5 +389,5 @@ const MSP = {
|
||||||
this.packet_error = 0; // reset CRC packet error counter for next session
|
this.packet_error = 0; // reset CRC packet error counter for next session
|
||||||
|
|
||||||
this.callbacks_cleanup();
|
this.callbacks_cleanup();
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,5 +34,5 @@ const PortUsage = {
|
||||||
|
|
||||||
this.port_usage_down = 0;
|
this.port_usage_down = 0;
|
||||||
this.port_usage_up = 0;
|
this.port_usage_up = 0;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@ const STM32_protocol = function () {
|
||||||
|
|
||||||
this.status = {
|
this.status = {
|
||||||
ACK: 0x79, // y
|
ACK: 0x79, // y
|
||||||
NACK: 0x1F
|
NACK: 0x1F,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.command = {
|
this.command = {
|
||||||
|
@ -41,7 +41,7 @@ const STM32_protocol = function () {
|
||||||
write_protect: 0x63, // Enables the write protection for some sectors
|
write_protect: 0x63, // Enables the write protection for some sectors
|
||||||
write_unprotect: 0x73, // Disables the write protection for all Flash memory sectors
|
write_unprotect: 0x73, // Disables the write protection for all Flash memory sectors
|
||||||
readout_protect: 0x82, // Enables the read protection
|
readout_protect: 0x82, // Enables the read protection
|
||||||
readout_unprotect: 0x92 // Disables the read protection
|
readout_unprotect: 0x92, // Disables the read protection
|
||||||
};
|
};
|
||||||
|
|
||||||
// Erase (x043) and Extended Erase (0x44) are exclusive. A device may support either the Erase command or the Extended Erase command but not both.
|
// Erase (x043) and Extended Erase (0x44) are exclusive. A device may support either the Erase command or the Extended Erase command but not both.
|
||||||
|
@ -63,7 +63,7 @@ STM32_protocol.prototype.connect = function (port, baud, hex, options, callback)
|
||||||
self.options = {
|
self.options = {
|
||||||
no_reboot: false,
|
no_reboot: false,
|
||||||
reboot_baud: false,
|
reboot_baud: false,
|
||||||
erase_chip: false
|
erase_chip: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.no_reboot) {
|
if (options.no_reboot) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ var STM32DFU_protocol = function () {
|
||||||
GETSTATUS: 0x03, // IN, Requests device to send status report to the Host (including status resulting from the last request execution and the state the device will enter immediately after this request).
|
GETSTATUS: 0x03, // IN, Requests device to send status report to the Host (including status resulting from the last request execution and the state the device will enter immediately after this request).
|
||||||
CLRSTATUS: 0x04, // OUT, Requests device to clear error status and move to next step
|
CLRSTATUS: 0x04, // OUT, Requests device to clear error status and move to next step
|
||||||
GETSTATE: 0x05, // IN, Requests the device to send only the state it will enter immediately after this request.
|
GETSTATE: 0x05, // IN, Requests the device to send only the state it will enter immediately after this request.
|
||||||
ABORT: 0x06 // OUT, Requests device to exit the current state/operation and enter idle state immediately.
|
ABORT: 0x06, // OUT, Requests device to exit the current state/operation and enter idle state immediately.
|
||||||
};
|
};
|
||||||
|
|
||||||
this.status = {
|
this.status = {
|
||||||
|
@ -45,7 +45,7 @@ var STM32DFU_protocol = function () {
|
||||||
errUSBR: 0x0C, // Device detected unexpected USB reset signaling.
|
errUSBR: 0x0C, // Device detected unexpected USB reset signaling.
|
||||||
errPOR: 0x0D, // Device detected unexpected power on reset.
|
errPOR: 0x0D, // Device detected unexpected power on reset.
|
||||||
errUNKNOWN: 0x0E, // Something went wrong, but the device does not know what it was.
|
errUNKNOWN: 0x0E, // Something went wrong, but the device does not know what it was.
|
||||||
errSTALLEDPKT: 0x0F // Device stalled an unexpected request.
|
errSTALLEDPKT: 0x0F, // Device stalled an unexpected request.
|
||||||
};
|
};
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
|
@ -59,7 +59,7 @@ var STM32DFU_protocol = function () {
|
||||||
dfuMANIFEST: 7, // Device is in the Manifestation phase. (Not all devices will be able to respond to DFU_GETSTATUS when in this state.)
|
dfuMANIFEST: 7, // Device is in the Manifestation phase. (Not all devices will be able to respond to DFU_GETSTATUS when in this state.)
|
||||||
dfuMANIFEST_WAIT_RESET: 8, // Device has programmed its memories and is waiting for a USB reset or a power on reset. (Devices that must enter this state clear bitManifestationTolerant to 0.)
|
dfuMANIFEST_WAIT_RESET: 8, // Device has programmed its memories and is waiting for a USB reset or a power on reset. (Devices that must enter this state clear bitManifestationTolerant to 0.)
|
||||||
dfuUPLOAD_IDLE: 9, // The device is processing an upload operation. Expecting DFU_UPLOAD requests.
|
dfuUPLOAD_IDLE: 9, // The device is processing an upload operation. Expecting DFU_UPLOAD requests.
|
||||||
dfuERROR: 10 // An error has occurred. Awaiting the DFU_CLRSTATUS request.
|
dfuERROR: 10, // An error has occurred. Awaiting the DFU_CLRSTATUS request.
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chipInfo = null; // information about chip's memory
|
this.chipInfo = null; // information about chip's memory
|
||||||
|
@ -189,7 +189,7 @@ STM32DFU_protocol.prototype.getString = function (index, callback) {
|
||||||
'request': 6,
|
'request': 6,
|
||||||
'value': 0x300 | index,
|
'value': 0x300 | index,
|
||||||
'index': 0, // specifies language
|
'index': 0, // specifies language
|
||||||
'length': 255 // max length to retreive
|
'length': 255, // max length to retreive
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
console.log('USB getString failed! ' + result.resultCode);
|
console.log('USB getString failed! ' + result.resultCode);
|
||||||
|
@ -258,7 +258,7 @@ STM32DFU_protocol.prototype.getInterfaceDescriptor = function (_interface, callb
|
||||||
'request': 6,
|
'request': 6,
|
||||||
'value': 0x200,
|
'value': 0x200,
|
||||||
'index': 0,
|
'index': 0,
|
||||||
'length': 18 + _interface * 9
|
'length': 18 + _interface * 9,
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
console.log('USB getInterfaceDescriptor failed! ' + result.resultCode);
|
console.log('USB getInterfaceDescriptor failed! ' + result.resultCode);
|
||||||
|
@ -276,7 +276,7 @@ STM32DFU_protocol.prototype.getInterfaceDescriptor = function (_interface, callb
|
||||||
'bInterfaceClass': buf[5],
|
'bInterfaceClass': buf[5],
|
||||||
'bInterfaceSubclass': buf[6],
|
'bInterfaceSubclass': buf[6],
|
||||||
'bInterfaceProtocol': buf[7],
|
'bInterfaceProtocol': buf[7],
|
||||||
'iInterface': buf[8]
|
'iInterface': buf[8],
|
||||||
};
|
};
|
||||||
|
|
||||||
callback(descriptor, result.resultCode);
|
callback(descriptor, result.resultCode);
|
||||||
|
@ -292,7 +292,7 @@ STM32DFU_protocol.prototype.getFunctionalDescriptor = function (_interface, call
|
||||||
'request': 6,
|
'request': 6,
|
||||||
'value': 0x2100,
|
'value': 0x2100,
|
||||||
'index': 0,
|
'index': 0,
|
||||||
'length': 255
|
'length': 255,
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
console.log('USB getFunctionalDescriptor failed! ' + result.resultCode);
|
console.log('USB getFunctionalDescriptor failed! ' + result.resultCode);
|
||||||
|
@ -308,7 +308,7 @@ STM32DFU_protocol.prototype.getFunctionalDescriptor = function (_interface, call
|
||||||
'bmAttributes': buf[2],
|
'bmAttributes': buf[2],
|
||||||
'wDetachTimeOut': (buf[4] << 8)|buf[3],
|
'wDetachTimeOut': (buf[4] << 8)|buf[3],
|
||||||
'wTransferSize': (buf[6] << 8)|buf[5],
|
'wTransferSize': (buf[6] << 8)|buf[5],
|
||||||
'bcdDFUVersion': buf[7]
|
'bcdDFUVersion': buf[7],
|
||||||
};
|
};
|
||||||
|
|
||||||
callback(descriptor, result.resultCode);
|
callback(descriptor, result.resultCode);
|
||||||
|
@ -397,7 +397,7 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) {
|
||||||
'num_pages' : num_pages,
|
'num_pages' : num_pages,
|
||||||
'start_address': start_address + total_size,
|
'start_address': start_address + total_size,
|
||||||
'page_size' : page_size,
|
'page_size' : page_size,
|
||||||
'total_size' : num_pages * page_size
|
'total_size' : num_pages * page_size,
|
||||||
});
|
});
|
||||||
|
|
||||||
total_size += num_pages * page_size;
|
total_size += num_pages * page_size;
|
||||||
|
@ -407,7 +407,7 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) {
|
||||||
'type' : type,
|
'type' : type,
|
||||||
'start_address': start_address,
|
'start_address': start_address,
|
||||||
'sectors' : sectors,
|
'sectors' : sectors,
|
||||||
'total_size' : total_size
|
'total_size' : total_size,
|
||||||
};
|
};
|
||||||
return memory;
|
return memory;
|
||||||
};
|
};
|
||||||
|
@ -440,7 +440,7 @@ STM32DFU_protocol.prototype.controlTransfer = function (direction, request, valu
|
||||||
'value': value,
|
'value': value,
|
||||||
'index': _interface,
|
'index': _interface,
|
||||||
'length': length,
|
'length': length,
|
||||||
'timeout': timeout
|
'timeout': timeout,
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
console.log('USB controlTransfer IN failed for request ' + request + '!');
|
console.log('USB controlTransfer IN failed for request ' + request + '!');
|
||||||
|
@ -468,7 +468,7 @@ STM32DFU_protocol.prototype.controlTransfer = function (direction, request, valu
|
||||||
'value': value,
|
'value': value,
|
||||||
'index': _interface,
|
'index': _interface,
|
||||||
'data': arrayBuf,
|
'data': arrayBuf,
|
||||||
'timeout': timeout
|
'timeout': timeout,
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
console.log('USB controlTransfer OUT failed for request ' + request + '!');
|
console.log('USB controlTransfer OUT failed for request ' + request + '!');
|
||||||
|
|
|
@ -391,7 +391,7 @@ const serial = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
onReceiveError: {
|
onReceiveError: {
|
||||||
listeners: [],
|
listeners: [],
|
||||||
|
@ -411,7 +411,7 @@ const serial = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
emptyOutputBuffer: function () {
|
emptyOutputBuffer: function () {
|
||||||
this.outputBuffer = [];
|
this.outputBuffer = [];
|
||||||
|
|
|
@ -695,7 +695,7 @@ function update_live_status() {
|
||||||
const statuswrapper = $('#quad-status_wrapper');
|
const statuswrapper = $('#quad-status_wrapper');
|
||||||
|
|
||||||
$(".quad-status-contents").css({
|
$(".quad-status-contents").css({
|
||||||
display: 'inline-block'
|
display: 'inline-block',
|
||||||
});
|
});
|
||||||
|
|
||||||
if (GUI.active_tab !== 'cli' && GUI.active_tab !== 'presets') {
|
if (GUI.active_tab !== 'cli' && GUI.active_tab !== 'presets') {
|
||||||
|
@ -806,25 +806,25 @@ function update_dataflash_global() {
|
||||||
|
|
||||||
if (supportsDataflash){
|
if (supportsDataflash){
|
||||||
$(".noflash_global").css({
|
$(".noflash_global").css({
|
||||||
display: 'none'
|
display: 'none',
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".dataflash-contents_global").css({
|
$(".dataflash-contents_global").css({
|
||||||
display: 'block'
|
display: 'block',
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".dataflash-free_global").css({
|
$(".dataflash-free_global").css({
|
||||||
width: (100-(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) / FC.DATAFLASH.totalSize * 100) + "%",
|
width: (100-(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) / FC.DATAFLASH.totalSize * 100) + "%",
|
||||||
display: 'block'
|
display: 'block',
|
||||||
});
|
});
|
||||||
$(".dataflash-free_global div").text('Dataflash: free ' + formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize));
|
$(".dataflash-free_global div").text('Dataflash: free ' + formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize));
|
||||||
} else {
|
} else {
|
||||||
$(".noflash_global").css({
|
$(".noflash_global").css({
|
||||||
display: 'block'
|
display: 'block',
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".dataflash-contents_global").css({
|
$(".dataflash-contents_global").css({
|
||||||
display: 'none'
|
display: 'none',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
|
|
||||||
const channel_range = {
|
const channel_range = {
|
||||||
'min': [ 900 ],
|
'min': [ 900 ],
|
||||||
'max': [ 2100 ]
|
'max': [ 2100 ],
|
||||||
};
|
};
|
||||||
|
|
||||||
let rangeValues = [1300, 1700];
|
let rangeValues = [1300, 1700];
|
||||||
|
@ -106,8 +106,8 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
connect: true,
|
connect: true,
|
||||||
range: channel_range,
|
range: channel_range,
|
||||||
format: wNumb({
|
format: wNumb({
|
||||||
decimals: 0
|
decimals: 0,
|
||||||
})
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
$(newAdjustment).find('.channel-slider').Link('lower').to($(newAdjustment).find('.lowerLimitValue'));
|
$(newAdjustment).find('.channel-slider').Link('lower').to($(newAdjustment).find('.lowerLimitValue'));
|
||||||
|
@ -117,7 +117,7 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
mode: 'values',
|
mode: 'values',
|
||||||
values: [900, 1000, 1200, 1400, 1500, 1600, 1800, 2000, 2100],
|
values: [900, 1000, 1200, 1400, 1500, 1600, 1800, 2000, 2100],
|
||||||
density: 4,
|
density: 4,
|
||||||
stepped: true
|
stepped: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -187,10 +187,10 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
auxChannelIndex: 0,
|
auxChannelIndex: 0,
|
||||||
range: {
|
range: {
|
||||||
start: 900,
|
start: 900,
|
||||||
end: 900
|
end: 900,
|
||||||
},
|
},
|
||||||
adjustmentFunction: 0,
|
adjustmentFunction: 0,
|
||||||
auxSwitchChannelIndex: 0
|
auxSwitchChannelIndex: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
$('.tab-adjustments .adjustments .adjustment').each(function () {
|
$('.tab-adjustments .adjustments .adjustment').each(function () {
|
||||||
|
@ -208,10 +208,10 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
auxChannelIndex: parseInt($(this).find('.channelInfo .channel').val()),
|
auxChannelIndex: parseInt($(this).find('.channelInfo .channel').val()),
|
||||||
range: {
|
range: {
|
||||||
start: rangeValues[0],
|
start: rangeValues[0],
|
||||||
end: rangeValues[1]
|
end: rangeValues[1],
|
||||||
},
|
},
|
||||||
adjustmentFunction: parseInt($(this).find('.functionSelection .function').val()),
|
adjustmentFunction: parseInt($(this).find('.functionSelection .function').val()),
|
||||||
auxSwitchChannelIndex: parseInt($(this).find('.functionSwitchChannel .channel').val())
|
auxSwitchChannelIndex: parseInt($(this).find('.functionSwitchChannel .channel').val()),
|
||||||
};
|
};
|
||||||
FC.ADJUSTMENT_RANGES.push(adjustmentRange);
|
FC.ADJUSTMENT_RANGES.push(adjustmentRange);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -140,7 +140,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
|
|
||||||
const channel_range = {
|
const channel_range = {
|
||||||
'min': [ 900 ],
|
'min': [ 900 ],
|
||||||
'max': [ 2100 ]
|
'max': [ 2100 ],
|
||||||
};
|
};
|
||||||
|
|
||||||
let rangeValues = [1300, 1700]; // matches MultiWii default values for the old checkbox MID range.
|
let rangeValues = [1300, 1700]; // matches MultiWii default values for the old checkbox MID range.
|
||||||
|
@ -169,7 +169,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
range: channel_range,
|
range: channel_range,
|
||||||
format: wNumb({
|
format: wNumb({
|
||||||
decimals: 0,
|
decimals: 0,
|
||||||
})
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const elementName = '#mode-' + modeIndex + '-range-' + rangeIndex;
|
const elementName = '#mode-' + modeIndex + '-range-' + rangeIndex;
|
||||||
|
@ -184,7 +184,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
mode: 'values',
|
mode: 'values',
|
||||||
values: sliderValues,
|
values: sliderValues,
|
||||||
density: 4,
|
density: 4,
|
||||||
stepped: true
|
stepped: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
$(rangeElement).find('.deleteRange').data('rangeElement', rangeElement);
|
$(rangeElement).find('.deleteRange').data('rangeElement', rangeElement);
|
||||||
|
@ -269,7 +269,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
let modeRangeExtra = {
|
let modeRangeExtra = {
|
||||||
id: modeRange.id,
|
id: modeRange.id,
|
||||||
modeLogic: 0,
|
modeLogic: 0,
|
||||||
linkedTo: 0
|
linkedTo: 0,
|
||||||
};
|
};
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_41)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_41)) {
|
||||||
modeRangeExtra = FC.MODE_RANGES_EXTRA[modeRangeIndex];
|
modeRangeExtra = FC.MODE_RANGES_EXTRA[modeRangeIndex];
|
||||||
|
@ -333,15 +333,15 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
auxChannelIndex: parseInt($(this).find('.channel').val()),
|
auxChannelIndex: parseInt($(this).find('.channel').val()),
|
||||||
range: {
|
range: {
|
||||||
start: rangeValues[0],
|
start: rangeValues[0],
|
||||||
end: rangeValues[1]
|
end: rangeValues[1],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES.push(modeRange);
|
FC.MODE_RANGES.push(modeRange);
|
||||||
|
|
||||||
const modeRangeExtra = {
|
const modeRangeExtra = {
|
||||||
id: modeId,
|
id: modeId,
|
||||||
modeLogic: parseInt($(this).find('.logic').val()),
|
modeLogic: parseInt($(this).find('.logic').val()),
|
||||||
linkedTo: 0
|
linkedTo: 0,
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES_EXTRA.push(modeRangeExtra);
|
FC.MODE_RANGES_EXTRA.push(modeRangeExtra);
|
||||||
});
|
});
|
||||||
|
@ -357,15 +357,15 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
auxChannelIndex: 0,
|
auxChannelIndex: 0,
|
||||||
range: {
|
range: {
|
||||||
start: 900,
|
start: 900,
|
||||||
end: 900
|
end: 900,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES.push(modeRange);
|
FC.MODE_RANGES.push(modeRange);
|
||||||
|
|
||||||
const modeRangeExtra = {
|
const modeRangeExtra = {
|
||||||
id: modeId,
|
id: modeId,
|
||||||
modeLogic: parseInt($(this).find('.logic').val()),
|
modeLogic: parseInt($(this).find('.logic').val()),
|
||||||
linkedTo: linkedToSelection
|
linkedTo: linkedToSelection,
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES_EXTRA.push(modeRangeExtra);
|
FC.MODE_RANGES_EXTRA.push(modeRangeExtra);
|
||||||
}
|
}
|
||||||
|
@ -378,15 +378,15 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
auxChannelIndex: 0,
|
auxChannelIndex: 0,
|
||||||
range: {
|
range: {
|
||||||
start: 900,
|
start: 900,
|
||||||
end: 900
|
end: 900,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES.push(defaultModeRange);
|
FC.MODE_RANGES.push(defaultModeRange);
|
||||||
|
|
||||||
const defaultModeRangeExtra = {
|
const defaultModeRangeExtra = {
|
||||||
id: 0,
|
id: 0,
|
||||||
modeLogic: 0,
|
modeLogic: 0,
|
||||||
linkedTo: 0
|
linkedTo: 0,
|
||||||
};
|
};
|
||||||
FC.MODE_RANGES_EXTRA.push(defaultModeRangeExtra);
|
FC.MODE_RANGES_EXTRA.push(defaultModeRangeExtra);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
|
||||||
i18n.getMessage('controlAxisRoll'),
|
i18n.getMessage('controlAxisRoll'),
|
||||||
i18n.getMessage('controlAxisPitch'),
|
i18n.getMessage('controlAxisPitch'),
|
||||||
i18n.getMessage('controlAxisYaw'),
|
i18n.getMessage('controlAxisYaw'),
|
||||||
i18n.getMessage('controlAxisThrottle')
|
i18n.getMessage('controlAxisThrottle'),
|
||||||
],
|
],
|
||||||
fullChannels_e = $('div.activechannellist');
|
fullChannels_e = $('div.activechannellist');
|
||||||
let aux_index = 1,
|
let aux_index = 1,
|
||||||
|
|
|
@ -214,7 +214,7 @@ firmware_flasher.initialize = function (callback) {
|
||||||
"file" : asset.name,
|
"file" : asset.name,
|
||||||
"target" : target,
|
"target" : target,
|
||||||
"date" : formattedDate,
|
"date" : formattedDate,
|
||||||
"notes" : release.body
|
"notes" : release.body,
|
||||||
};
|
};
|
||||||
releases[target].push(descriptor);
|
releases[target].push(descriptor);
|
||||||
});
|
});
|
||||||
|
@ -323,24 +323,24 @@ firmware_flasher.initialize = function (callback) {
|
||||||
const buildTypes = [
|
const buildTypes = [
|
||||||
{
|
{
|
||||||
tag: 'firmwareFlasherOptionLabelBuildTypeRelease',
|
tag: 'firmwareFlasherOptionLabelBuildTypeRelease',
|
||||||
loader: () => self.releaseChecker.loadReleaseData(releaseData => processBoardOptions(releaseData, false))
|
loader: () => self.releaseChecker.loadReleaseData(releaseData => processBoardOptions(releaseData, false)),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tag: 'firmwareFlasherOptionLabelBuildTypeReleaseCandidate',
|
tag: 'firmwareFlasherOptionLabelBuildTypeReleaseCandidate',
|
||||||
loader: () => self.releaseChecker.loadReleaseData(releaseData => processBoardOptions(releaseData, true))
|
loader: () => self.releaseChecker.loadReleaseData(releaseData => processBoardOptions(releaseData, true)),
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const ciBuildsTypes = self.jenkinsLoader._jobs.map(job => {
|
const ciBuildsTypes = self.jenkinsLoader._jobs.map(job => {
|
||||||
if (job.title === "Development") {
|
if (job.title === "Development") {
|
||||||
return {
|
return {
|
||||||
tag: "firmwareFlasherOptionLabelBuildTypeDevelopment",
|
tag: "firmwareFlasherOptionLabelBuildTypeDevelopment",
|
||||||
loader: () => self.jenkinsLoader.loadBuilds(job.name, loadUnifiedBuilds)
|
loader: () => self.jenkinsLoader.loadBuilds(job.name, loadUnifiedBuilds),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: job.title,
|
title: job.title,
|
||||||
loader: () => self.jenkinsLoader.loadBuilds(job.name, loadUnifiedBuilds)
|
loader: () => self.jenkinsLoader.loadBuilds(job.name, loadUnifiedBuilds),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -353,8 +353,8 @@ firmware_flasher.initialize = function (callback) {
|
||||||
$(
|
$(
|
||||||
`<option value='${index}'>${
|
`<option value='${index}'>${
|
||||||
tag ? i18n.getMessage(tag) : title
|
tag ? i18n.getMessage(tag) : title
|
||||||
}</option>`
|
}</option>`,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
buildType_e.val($('select[name="build_type"] option:first').val());
|
buildType_e.val($('select[name="build_type"] option:first').val());
|
||||||
|
@ -460,9 +460,9 @@ firmware_flasher.initialize = function (callback) {
|
||||||
versions_element.append(
|
versions_element.append(
|
||||||
$(
|
$(
|
||||||
`<option value='0'>${i18n.getMessage(
|
`<option value='0'>${i18n.getMessage(
|
||||||
"firmwareFlasherOptionLabelSelectFirmwareVersionFor"
|
"firmwareFlasherOptionLabelSelectFirmwareVersionFor",
|
||||||
)} ${target}</option>`
|
)} ${target}</option>`,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
targetVersions
|
targetVersions
|
||||||
.sort(sortVersions)
|
.sort(sortVersions)
|
||||||
|
@ -580,9 +580,9 @@ firmware_flasher.initialize = function (callback) {
|
||||||
versions_e.append(
|
versions_e.append(
|
||||||
$(
|
$(
|
||||||
`<option value='0'>${i18n.getMessage(
|
`<option value='0'>${i18n.getMessage(
|
||||||
"firmwareFlasherOptionLabelSelectFirmwareVersion"
|
"firmwareFlasherOptionLabelSelectFirmwareVersion",
|
||||||
)}</option>`
|
)}</option>`,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Show a loading message as there is a delay in loading a configuration
|
// Show a loading message as there is a delay in loading a configuration
|
||||||
|
@ -590,9 +590,9 @@ firmware_flasher.initialize = function (callback) {
|
||||||
versions_e.append(
|
versions_e.append(
|
||||||
$(
|
$(
|
||||||
`<option value='0'>${i18n.getMessage(
|
`<option value='0'>${i18n.getMessage(
|
||||||
"firmwareFlasherOptionLoading"
|
"firmwareFlasherOptionLoading",
|
||||||
)}</option>`
|
)}</option>`,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const builds = [];
|
const builds = [];
|
||||||
|
@ -967,9 +967,9 @@ firmware_flasher.initialize = function (callback) {
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
description: 'target files',
|
description: 'target files',
|
||||||
extensions: ['hex', 'config']
|
extensions: ['hex', 'config'],
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}, function (fileEntry) {
|
}, function (fileEntry) {
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -123,7 +123,7 @@ TABS.gps.initialize = function (callback) {
|
||||||
const message = {
|
const message = {
|
||||||
action: 'center',
|
action: 'center',
|
||||||
lat: lat,
|
lat: lat,
|
||||||
lon: lon
|
lon: lon,
|
||||||
};
|
};
|
||||||
|
|
||||||
frame = document.getElementById('map');
|
frame = document.getElementById('map');
|
||||||
|
@ -190,7 +190,7 @@ TABS.gps.initialize = function (callback) {
|
||||||
$('#zoom_in').click(function() {
|
$('#zoom_in').click(function() {
|
||||||
console.log('zoom in');
|
console.log('zoom in');
|
||||||
const message = {
|
const message = {
|
||||||
action: 'zoom_in'
|
action: 'zoom_in',
|
||||||
};
|
};
|
||||||
frame.contentWindow.postMessage(message, '*');
|
frame.contentWindow.postMessage(message, '*');
|
||||||
});
|
});
|
||||||
|
@ -198,7 +198,7 @@ TABS.gps.initialize = function (callback) {
|
||||||
$('#zoom_out').click(function() {
|
$('#zoom_out').click(function() {
|
||||||
console.log('zoom out');
|
console.log('zoom out');
|
||||||
const message = {
|
const message = {
|
||||||
action: 'zoom_out'
|
action: 'zoom_out',
|
||||||
};
|
};
|
||||||
frame.contentWindow.postMessage(message, '*');
|
frame.contentWindow.postMessage(message, '*');
|
||||||
});
|
});
|
||||||
|
|
|
@ -54,5 +54,5 @@ landing.cleanup = function (callback) {
|
||||||
// TODO: remove after all is using modules
|
// TODO: remove after all is using modules
|
||||||
window.TABS.landing = landing;
|
window.TABS.landing = landing;
|
||||||
export {
|
export {
|
||||||
landing
|
landing,
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
TABS.led_strip = {
|
TABS.led_strip = {
|
||||||
wireMode: false,
|
wireMode: false,
|
||||||
directions: ['n', 'e', 's', 'w', 'u', 'd']
|
directions: ['n', 'e', 's', 'w', 'u', 'd'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
|
||||||
if (!colorDefineSliders.is(":hover")) {
|
if (!colorDefineSliders.is(":hover")) {
|
||||||
colorDefineSliders.hide();
|
colorDefineSliders.hide();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.funcWire').click(function() {
|
$('.funcWire').click(function() {
|
||||||
|
@ -422,7 +422,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
|
||||||
directionsInSelection.forEach(function(direction_e) {
|
directionsInSelection.forEach(function(direction_e) {
|
||||||
$(direction_e).addClass('btnOn');
|
$(direction_e).addClass('btnOn');
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// UI: select LED function from drop-down
|
// UI: select LED function from drop-down
|
||||||
|
@ -691,7 +691,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
directions: '',
|
directions: '',
|
||||||
functions: ''
|
functions: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let i = 0; i < ledStripLength; i++) {
|
for (let i = 0; i < ledStripLength; i++) {
|
||||||
|
|
|
@ -19,55 +19,55 @@ function initializeMap() {
|
||||||
|
|
||||||
mapView = new ol.View({
|
mapView = new ol.View({
|
||||||
center: lonLat,
|
center: lonLat,
|
||||||
zoom: DEFAULT_ZOOM
|
zoom: DEFAULT_ZOOM,
|
||||||
});
|
});
|
||||||
|
|
||||||
map = new ol.Map({
|
map = new ol.Map({
|
||||||
target: 'map-canvas',
|
target: 'map-canvas',
|
||||||
layers: [
|
layers: [
|
||||||
new ol.layer.Tile({
|
new ol.layer.Tile({
|
||||||
source: new ol.source.OSM()
|
source: new ol.source.OSM(),
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
view: mapView,
|
view: mapView,
|
||||||
controls: []
|
controls: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const icon = new ol.style.Icon(({
|
const icon = new ol.style.Icon(({
|
||||||
anchor: [0.5, 1],
|
anchor: [0.5, 1],
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: 0.5,
|
scale: 0.5,
|
||||||
src: ICON_IMAGE
|
src: ICON_IMAGE,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const iconNoFix = new ol.style.Icon(({
|
const iconNoFix = new ol.style.Icon(({
|
||||||
anchor: [0.5, 1],
|
anchor: [0.5, 1],
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: 0.5,
|
scale: 0.5,
|
||||||
src: ICON_IMAGE_NOFIX
|
src: ICON_IMAGE_NOFIX,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
iconStyle = new ol.style.Style({
|
iconStyle = new ol.style.Style({
|
||||||
image: icon
|
image: icon,
|
||||||
});
|
});
|
||||||
|
|
||||||
iconStyleNoFix = new ol.style.Style({
|
iconStyleNoFix = new ol.style.Style({
|
||||||
image: iconNoFix
|
image: iconNoFix,
|
||||||
});
|
});
|
||||||
|
|
||||||
iconGeometry = new ol.geom.Point(lonLat);
|
iconGeometry = new ol.geom.Point(lonLat);
|
||||||
iconFeature = new ol.Feature({
|
iconFeature = new ol.Feature({
|
||||||
geometry: iconGeometry
|
geometry: iconGeometry,
|
||||||
});
|
});
|
||||||
|
|
||||||
iconFeature.setStyle(iconStyle);
|
iconFeature.setStyle(iconStyle);
|
||||||
|
|
||||||
const vectorSource = new ol.source.Vector({
|
const vectorSource = new ol.source.Vector({
|
||||||
features: [iconFeature]
|
features: [iconFeature],
|
||||||
});
|
});
|
||||||
|
|
||||||
const currentPositionLayer = new ol.layer.Vector({
|
const currentPositionLayer = new ol.layer.Vector({
|
||||||
source: vectorSource
|
source: vectorSource,
|
||||||
});
|
});
|
||||||
|
|
||||||
map.addLayer(currentPositionLayer);
|
map.addLayer(currentPositionLayer);
|
||||||
|
|
|
@ -418,7 +418,7 @@ TABS.motors.initialize = function (callback) {
|
||||||
x: [],
|
x: [],
|
||||||
y: [],
|
y: [],
|
||||||
z: [],
|
z: [],
|
||||||
rms: []
|
rms: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
$('.plot_control .x, .plot_control .y, .plot_control .z, .plot_control .rms').each(function () {
|
$('.plot_control .x, .plot_control .y, .plot_control .z, .plot_control .rms').each(function () {
|
||||||
|
@ -529,7 +529,7 @@ TABS.motors.initialize = function (callback) {
|
||||||
const gyro = [
|
const gyro = [
|
||||||
FC.SENSOR_DATA.gyroscope[0],
|
FC.SENSOR_DATA.gyroscope[0],
|
||||||
FC.SENSOR_DATA.gyroscope[1],
|
FC.SENSOR_DATA.gyroscope[1],
|
||||||
FC.SENSOR_DATA.gyroscope[2]
|
FC.SENSOR_DATA.gyroscope[2],
|
||||||
];
|
];
|
||||||
|
|
||||||
updateGraphHelperSize(gyroHelpers);
|
updateGraphHelperSize(gyroHelpers);
|
||||||
|
|
|
@ -8,7 +8,7 @@ TABS.onboard_logging = {
|
||||||
|
|
||||||
BLOCK_SIZE: 4096,
|
BLOCK_SIZE: 4096,
|
||||||
VCP_BLOCK_SIZE_3_0: 512,
|
VCP_BLOCK_SIZE_3_0: 512,
|
||||||
VCP_BLOCK_SIZE: 4096
|
VCP_BLOCK_SIZE: 4096,
|
||||||
};
|
};
|
||||||
TABS.onboard_logging.initialize = function (callback) {
|
TABS.onboard_logging.initialize = function (callback) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -251,7 +251,7 @@ TABS.onboard_logging.initialize = function (callback) {
|
||||||
{num: 1, denom: 7},
|
{num: 1, denom: 7},
|
||||||
{num: 1, denom: 8},
|
{num: 1, denom: 8},
|
||||||
{num: 1, denom: 16},
|
{num: 1, denom: 16},
|
||||||
{num: 1, denom: 32}
|
{num: 1, denom: 32},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -406,13 +406,13 @@ TABS.onboard_logging.initialize = function (callback) {
|
||||||
if (value > 0) {
|
if (value > 0) {
|
||||||
bar.css({
|
bar.css({
|
||||||
width: (value / total * 100) + "%",
|
width: (value / total * 100) + "%",
|
||||||
display: 'block'
|
display: 'block',
|
||||||
});
|
});
|
||||||
|
|
||||||
$("div", bar).text((label ? label + " " : "") + (valuesAreKilobytes ? formatFilesizeKilobytes(value) : formatFilesizeBytes(value)));
|
$("div", bar).text((label ? label + " " : "") + (valuesAreKilobytes ? formatFilesizeKilobytes(value) : formatFilesizeBytes(value)));
|
||||||
} else {
|
} else {
|
||||||
bar.css({
|
bar.css({
|
||||||
display: 'none'
|
display: 'none',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2569,7 +2569,7 @@ TABS.osd.initialize = function(callback) {
|
||||||
.append($(`<input name="video_system" type="radio"/>${videoFormatOptionText}</label>`)
|
.append($(`<input name="video_system" type="radio"/>${videoFormatOptionText}</label>`)
|
||||||
.prop('checked', i === OSD.data.video_system)
|
.prop('checked', i === OSD.data.video_system)
|
||||||
.data('type', type)
|
.data('type', type)
|
||||||
.data('type', i)
|
.data('type', i),
|
||||||
);
|
);
|
||||||
$videoTypes.append($checkbox);
|
$videoTypes.append($checkbox);
|
||||||
}
|
}
|
||||||
|
@ -2592,7 +2592,7 @@ TABS.osd.initialize = function(callback) {
|
||||||
.append($(`<input name="unit_mode" type="radio"/>${setupUnitOptionText}</label>`)
|
.append($(`<input name="unit_mode" type="radio"/>${setupUnitOptionText}</label>`)
|
||||||
.prop('checked', i === OSD.data.unit_mode)
|
.prop('checked', i === OSD.data.unit_mode)
|
||||||
.data('type', type)
|
.data('type', type)
|
||||||
.data('type', i)
|
.data('type', i),
|
||||||
);
|
);
|
||||||
$unitMode.append($checkbox);
|
$unitMode.append($checkbox);
|
||||||
}
|
}
|
||||||
|
@ -2739,7 +2739,7 @@ TABS.osd.initialize = function(callback) {
|
||||||
.then(function() {
|
.then(function() {
|
||||||
updateOsdView();
|
updateOsdView();
|
||||||
});
|
});
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
$field.append(`<label for="${field.name}" class="char-label">${titleizeField(field)}</label>`);
|
$field.append(`<label for="${field.name}" class="char-label">${titleizeField(field)}</label>`);
|
||||||
|
|
||||||
|
@ -2783,7 +2783,7 @@ TABS.osd.initialize = function(callback) {
|
||||||
.then(function() {
|
.then(function() {
|
||||||
updateOsdView();
|
updateOsdView();
|
||||||
});
|
});
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const finalFieldName = titleizeField(field);
|
const finalFieldName = titleizeField(field);
|
||||||
|
@ -2912,7 +2912,7 @@ TABS.osd.initialize = function(callback) {
|
||||||
.then(function() {
|
.then(function() {
|
||||||
updateOsdView();
|
updateOsdView();
|
||||||
});
|
});
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2957,7 +2957,7 @@ TABS.osd.initialize = function(callback) {
|
||||||
.then(function() {
|
.then(function() {
|
||||||
updateOsdView();
|
updateOsdView();
|
||||||
});
|
});
|
||||||
}))
|
})),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
yawDeadband: FC.RC_DEADBAND_CONFIG.yaw_deadband,
|
yawDeadband: FC.RC_DEADBAND_CONFIG.yaw_deadband,
|
||||||
roll_rate_limit: FC.RC_TUNING.roll_rate_limit,
|
roll_rate_limit: FC.RC_TUNING.roll_rate_limit,
|
||||||
pitch_rate_limit: FC.RC_TUNING.pitch_rate_limit,
|
pitch_rate_limit: FC.RC_TUNING.pitch_rate_limit,
|
||||||
yaw_rate_limit: FC.RC_TUNING.yaw_rate_limit
|
yaw_rate_limit: FC.RC_TUNING.yaw_rate_limit,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (semver.lt(FC.CONFIG.apiVersion, "1.7.0")) {
|
if (semver.lt(FC.CONFIG.apiVersion, "1.7.0")) {
|
||||||
|
@ -1764,18 +1764,18 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
{name: "LuxFloat"},
|
{name: "LuxFloat"},
|
||||||
{name: "MultiWii (2.3 - latest)"},
|
{name: "MultiWii (2.3 - latest)"},
|
||||||
{name: "MultiWii (2.3 - hybrid)"},
|
{name: "MultiWii (2.3 - hybrid)"},
|
||||||
{name: "Harakiri"}
|
{name: "Harakiri"},
|
||||||
];
|
];
|
||||||
} else if (semver.lt(FC.CONFIG.apiVersion, "1.20.0")) {
|
} else if (semver.lt(FC.CONFIG.apiVersion, "1.20.0")) {
|
||||||
pidControllerList = [
|
pidControllerList = [
|
||||||
{name: ""},
|
{name: ""},
|
||||||
{name: "Integer"},
|
{name: "Integer"},
|
||||||
{name: "Float"}
|
{name: "Float"},
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
pidControllerList = [
|
pidControllerList = [
|
||||||
{name: "Legacy"},
|
{name: "Legacy"},
|
||||||
{name: "Betaflight"}
|
{name: "Betaflight"},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2852,7 +2852,7 @@ TABS.pid_tuning.updateRatesLabels = function() {
|
||||||
const BALLOON_COLORS = {
|
const BALLOON_COLORS = {
|
||||||
roll : {color: 'rgba(255,128,128,0.4)', border: 'rgba(255,128,128,0.6)', text: '#000000'},
|
roll : {color: 'rgba(255,128,128,0.4)', border: 'rgba(255,128,128,0.6)', text: '#000000'},
|
||||||
pitch : {color: 'rgba(128,255,128,0.4)', border: 'rgba(128,255,128,0.6)', text: '#000000'},
|
pitch : {color: 'rgba(128,255,128,0.4)', border: 'rgba(128,255,128,0.6)', text: '#000000'},
|
||||||
yaw : {color: 'rgba(128,128,255,0.4)', border: 'rgba(128,128,255,0.6)', text: '#000000'}
|
yaw : {color: 'rgba(128,128,255,0.4)', border: 'rgba(128,128,255,0.6)', text: '#000000'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const rcStickElement = $('.rate_curve canvas#rate_curve_layer1').get(0);
|
const rcStickElement = $('.rate_curve canvas#rate_curve_layer1').get(0);
|
||||||
|
|
|
@ -76,7 +76,7 @@ TABS.power.initialize = function (callback) {
|
||||||
voltageDataSource[index] = {
|
voltageDataSource[index] = {
|
||||||
vbatscale: parseInt($(`input[name="vbatscale-${index}"]`).val()),
|
vbatscale: parseInt($(`input[name="vbatscale-${index}"]`).val()),
|
||||||
vbatresdivval: parseInt($(`input[name="vbatresdivval-${index}"]`).val()),
|
vbatresdivval: parseInt($(`input[name="vbatresdivval-${index}"]`).val()),
|
||||||
vbatresdivmultiplier: parseInt($(`input[name="vbatresdivmultiplier-${index}"]`).val())
|
vbatresdivmultiplier: parseInt($(`input[name="vbatresdivmultiplier-${index}"]`).val()),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
i18n.getMessage('controlAxisRoll'),
|
i18n.getMessage('controlAxisRoll'),
|
||||||
i18n.getMessage('controlAxisPitch'),
|
i18n.getMessage('controlAxisPitch'),
|
||||||
i18n.getMessage('controlAxisYaw'),
|
i18n.getMessage('controlAxisYaw'),
|
||||||
i18n.getMessage('controlAxisThrottle')
|
i18n.getMessage('controlAxisThrottle'),
|
||||||
];
|
];
|
||||||
|
|
||||||
const barContainer = $('.tab-receiver .bars');
|
const barContainer = $('.tab-receiver .bars');
|
||||||
|
@ -143,7 +143,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
// we could probably use min and max throttle for the range, will see
|
// we could probably use min and max throttle for the range, will see
|
||||||
const meterScale = {
|
const meterScale = {
|
||||||
'min': 800,
|
'min': 800,
|
||||||
'max': 2200
|
'max': 2200,
|
||||||
};
|
};
|
||||||
|
|
||||||
const meterFillArray = [];
|
const meterFillArray = [];
|
||||||
|
@ -288,7 +288,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
'FRSKY_X',
|
'FRSKY_X',
|
||||||
'A7105_FLYSKY',
|
'A7105_FLYSKY',
|
||||||
'A7105_FLYSKY_2A',
|
'A7105_FLYSKY_2A',
|
||||||
'NRF24_KN'
|
'NRF24_KN',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,20 +296,20 @@ TABS.receiver.initialize = function (callback) {
|
||||||
spiRxTypes.push(
|
spiRxTypes.push(
|
||||||
'SFHSS',
|
'SFHSS',
|
||||||
'SPEKTRUM',
|
'SPEKTRUM',
|
||||||
'FRSKY_X_LBT'
|
'FRSKY_X_LBT',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
|
||||||
spiRxTypes.push(
|
spiRxTypes.push(
|
||||||
'REDPINE'
|
'REDPINE',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
spiRxTypes.push(
|
spiRxTypes.push(
|
||||||
'FRSKY_X_V2',
|
'FRSKY_X_V2',
|
||||||
'FRSKY_X_LBT_V2'
|
'FRSKY_X_LBT_V2',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,9 +514,9 @@ TABS.receiver.initialize = function (callback) {
|
||||||
innerBounds: {
|
innerBounds: {
|
||||||
minWidth: windowWidth, minHeight: windowHeight,
|
minWidth: windowWidth, minHeight: windowHeight,
|
||||||
width: windowWidth, height: windowHeight,
|
width: windowWidth, height: windowHeight,
|
||||||
maxWidth: windowWidth, maxHeight: windowHeight
|
maxWidth: windowWidth, maxHeight: windowHeight,
|
||||||
},
|
},
|
||||||
alwaysOnTop: true
|
alwaysOnTop: true,
|
||||||
}, function(createdWindow) {
|
}, function(createdWindow) {
|
||||||
// Give the window a callback it can use to send the channels (otherwise it can't see those objects)
|
// Give the window a callback it can use to send the channels (otherwise it can't see those objects)
|
||||||
createdWindow.contentWindow.setRawRx = function(channels) {
|
createdWindow.contentWindow.setRawRx = function(channels) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ const watchers = {
|
||||||
} else {
|
} else {
|
||||||
applyNormalTheme();
|
applyNormalTheme();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
@ -182,8 +182,8 @@ $(document).ready(function() {
|
||||||
start: initialValue,
|
start: initialValue,
|
||||||
range: {
|
range: {
|
||||||
min: CHANNEL_MIN_VALUE,
|
min: CHANNEL_MIN_VALUE,
|
||||||
max: CHANNEL_MAX_VALUE
|
max: CHANNEL_MAX_VALUE,
|
||||||
}
|
},
|
||||||
}).on('slide change set', function(e, value) {
|
}).on('slide change set', function(e, value) {
|
||||||
value = Math.round(parseFloat(value));
|
value = Math.round(parseFloat(value));
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ TABS.sensors.initialize = function (callback) {
|
||||||
initDataArray(1),
|
initDataArray(1),
|
||||||
initDataArray(1),
|
initDataArray(1),
|
||||||
initDataArray(1),
|
initDataArray(1),
|
||||||
initDataArray(1)
|
initDataArray(1),
|
||||||
];
|
];
|
||||||
|
|
||||||
let gyroHelpers = initGraphHelpers('#gyro', samples_gyro_i, [-2000, 2000]);
|
let gyroHelpers = initGraphHelpers('#gyro', samples_gyro_i, [-2000, 2000]);
|
||||||
|
@ -277,13 +277,13 @@ TABS.sensors.initialize = function (callback) {
|
||||||
initGraphHelpers('#debug1', samples_debug_i),
|
initGraphHelpers('#debug1', samples_debug_i),
|
||||||
initGraphHelpers('#debug2', samples_debug_i),
|
initGraphHelpers('#debug2', samples_debug_i),
|
||||||
initGraphHelpers('#debug3', samples_debug_i),
|
initGraphHelpers('#debug3', samples_debug_i),
|
||||||
initGraphHelpers('#debug4', samples_debug_i)
|
initGraphHelpers('#debug4', samples_debug_i),
|
||||||
];
|
];
|
||||||
|
|
||||||
const raw_data_text_ements = {
|
const raw_data_text_ements = {
|
||||||
x: [],
|
x: [],
|
||||||
y: [],
|
y: [],
|
||||||
z: []
|
z: [],
|
||||||
};
|
};
|
||||||
$('.plot_control .x, .plot_control .y, .plot_control .z').each(function () {
|
$('.plot_control .x, .plot_control .y, .plot_control .z').each(function () {
|
||||||
const el = $(this);
|
const el = $(this);
|
||||||
|
@ -305,13 +305,13 @@ TABS.sensors.initialize = function (callback) {
|
||||||
'mag': parseInt($('.tab-sensors select[name="mag_refresh_rate"]').val(), 10),
|
'mag': parseInt($('.tab-sensors select[name="mag_refresh_rate"]').val(), 10),
|
||||||
'altitude': parseInt($('.tab-sensors select[name="altitude_refresh_rate"]').val(), 10),
|
'altitude': parseInt($('.tab-sensors select[name="altitude_refresh_rate"]').val(), 10),
|
||||||
'sonar': parseInt($('.tab-sensors select[name="sonar_refresh_rate"]').val(), 10),
|
'sonar': parseInt($('.tab-sensors select[name="sonar_refresh_rate"]').val(), 10),
|
||||||
'debug': parseInt($('.tab-sensors select[name="debug_refresh_rate"]').val(), 10)
|
'debug': parseInt($('.tab-sensors select[name="debug_refresh_rate"]').val(), 10),
|
||||||
};
|
};
|
||||||
|
|
||||||
const scales = {
|
const scales = {
|
||||||
'gyro': parseFloat($('.tab-sensors select[name="gyro_scale"]').val()),
|
'gyro': parseFloat($('.tab-sensors select[name="gyro_scale"]').val()),
|
||||||
'accel': parseFloat($('.tab-sensors select[name="accel_scale"]').val()),
|
'accel': parseFloat($('.tab-sensors select[name="accel_scale"]').val()),
|
||||||
'mag': parseFloat($('.tab-sensors select[name="mag_scale"]').val())
|
'mag': parseFloat($('.tab-sensors select[name="mag_scale"]').val()),
|
||||||
};
|
};
|
||||||
|
|
||||||
// handling of "data pulling" is a little bit funky here, as MSP_RAW_IMU contains values for gyro/accel/mag but not altitude
|
// handling of "data pulling" is a little bit funky here, as MSP_RAW_IMU contains values for gyro/accel/mag but not altitude
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
TABS.setup = {
|
TABS.setup = {
|
||||||
yaw_fix: 0.0
|
yaw_fix: 0.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
TABS.setup.initialize = function (callback) {
|
TABS.setup.initialize = function (callback) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
TABS.transponder = {
|
TABS.transponder = {
|
||||||
available: false
|
available: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
TABS.transponder.initialize = function(callback, scrollPosition) {
|
TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
|
@ -18,10 +18,10 @@ TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
// CONFIGURATION HERE FOR ADD NEW TRANSPONDER
|
// CONFIGURATION HERE FOR ADD NEW TRANSPONDER
|
||||||
let transponderConfigurations = {
|
let transponderConfigurations = {
|
||||||
0: {
|
0: {
|
||||||
dataType: dataTypes.NONE // empty
|
dataType: dataTypes.NONE, // empty
|
||||||
}, //NONE
|
}, //NONE
|
||||||
1: {
|
1: {
|
||||||
dataType: dataTypes.TEXT //<input type="text">
|
dataType: dataTypes.TEXT, //<input type="text">
|
||||||
}, //ilap
|
}, //ilap
|
||||||
2: {
|
2: {
|
||||||
dataType: dataTypes.LIST, // <select>...</select>
|
dataType: dataTypes.LIST, // <select>...</select>
|
||||||
|
@ -35,7 +35,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
'ID 7': 'E003F03F00FF03F0C1',
|
'ID 7': 'E003F03F00FF03F0C1',
|
||||||
'ID 8': '00FC0FFE071F3E00FE',
|
'ID 8': '00FC0FFE071F3E00FE',
|
||||||
'ID 9': 'E083BFF00F9E38C0FF',
|
'ID 9': 'E083BFF00F9E38C0FF',
|
||||||
}
|
},
|
||||||
}, //arcitimer
|
}, //arcitimer
|
||||||
3: {
|
3: {
|
||||||
dataType: dataTypes.LIST, // <select>...</select>
|
dataType: dataTypes.LIST, // <select>...</select>
|
||||||
|
@ -104,7 +104,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
'61':'3D',
|
'61':'3D',
|
||||||
'62':'3E',
|
'62':'3E',
|
||||||
'63':'3F',
|
'63':'3F',
|
||||||
}
|
},
|
||||||
}, //ERLT
|
}, //ERLT
|
||||||
};
|
};
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
@ -164,7 +164,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
//build radio buttons
|
//build radio buttons
|
||||||
if (transponderProviders.length > 1) {
|
if (transponderProviders.length > 1) {
|
||||||
transponderTypeSelect.append(
|
transponderTypeSelect.append(
|
||||||
$('<option>').attr('value', 0).html(i18n.getMessage("transponderType0")) // NONE
|
$('<option>').attr('value', 0).html(i18n.getMessage("transponderType0")), // NONE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) {
|
||||||
|
|
||||||
if ( transponderProvider.hasOwnProperty('id') ) {
|
if ( transponderProvider.hasOwnProperty('id') ) {
|
||||||
transponderTypeSelect.append(
|
transponderTypeSelect.append(
|
||||||
$('<option>').attr('value', transponderProvider.id).html(i18n.getMessage("transponderType" + transponderProvider.id))
|
$('<option>').attr('value', transponderProvider.id).html(i18n.getMessage("transponderType" + transponderProvider.id)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ TABS.vtx = {
|
||||||
env: new djv(),
|
env: new djv(),
|
||||||
get _DEVICE_STATUS_UPDATE_INTERVAL_NAME() {
|
get _DEVICE_STATUS_UPDATE_INTERVAL_NAME() {
|
||||||
return "vtx_device_status_request";
|
return "vtx_device_status_request";
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
TABS.vtx.isVtxDeviceStatusNotReady = function()
|
TABS.vtx.isVtxDeviceStatusNotReady = function()
|
||||||
|
@ -96,7 +96,7 @@ TABS.vtx.initialize = function (callback) {
|
||||||
GUI.interval_add_condition(self._DEVICE_STATUS_UPDATE_INTERVAL_NAME,
|
GUI.interval_add_condition(self._DEVICE_STATUS_UPDATE_INTERVAL_NAME,
|
||||||
TABS.vtx.updateVtxDeviceStatus,
|
TABS.vtx.updateVtxDeviceStatus,
|
||||||
1000, false,
|
1000, false,
|
||||||
TABS.vtx.isVtxDeviceStatusNotReady
|
TABS.vtx.isVtxDeviceStatusNotReady,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ TABS.vtx.initialize = function (callback) {
|
||||||
|
|
||||||
console.log("Validation against schema result:", valid);
|
console.log("Validation against schema result:", valid);
|
||||||
valid ? callback_valid() : callback_error();
|
valid ? callback_valid() : callback_error();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ TABS.vtx.initialize = function (callback) {
|
||||||
console.error('VTX Config from file failed validation against schema');
|
console.error('VTX Config from file failed validation against schema');
|
||||||
GUI.log(i18n.getMessage('vtxLoadFileKo'));
|
GUI.log(i18n.getMessage('vtxLoadFileKo'));
|
||||||
|
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -803,13 +803,13 @@ TABS.vtx.initialize = function (callback) {
|
||||||
// JSON is NOT valid
|
// JSON is NOT valid
|
||||||
GUI.log(i18n.getMessage('vtxLoadClipboardKo'));
|
GUI.log(i18n.getMessage('vtxLoadClipboardKo'));
|
||||||
console.error('VTX Config from clipboard failed validation against schema');
|
console.error('VTX Config from clipboard failed validation against schema');
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
GUI.log(i18n.getMessage('vtxLoadClipboardKo'));
|
GUI.log(i18n.getMessage('vtxLoadClipboardKo'));
|
||||||
console.error('Failed to read clipboard contents: ', err);
|
console.error('Failed to read clipboard contents: ', err);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ const majorFirmwareVersions = {
|
||||||
"1.39": "3.4.*",
|
"1.39": "3.4.*",
|
||||||
"1.37": "3.3.0",
|
"1.37": "3.3.0",
|
||||||
"1.36": "3.2.*",
|
"1.36": "3.2.*",
|
||||||
"1.31": "3.1.0"
|
"1.31": "3.1.0",
|
||||||
};
|
};
|
||||||
|
|
||||||
export function generateVirtualApiVersions() {
|
export function generateVirtualApiVersions() {
|
||||||
|
|
|
@ -10,13 +10,13 @@ CSSUtil.prototype.colorTables = {
|
||||||
redWhiteGreen: [
|
redWhiteGreen: [
|
||||||
{ percentage: -1, color: { r: 0xff, g: 0x00, b: 0x00, a: 1.0 } },
|
{ percentage: -1, color: { r: 0xff, g: 0x00, b: 0x00, a: 1.0 } },
|
||||||
{ percentage: 0, color: { r: 0xff, g: 0xff, b: 0xff, a: 1.0 } },
|
{ percentage: 0, color: { r: 0xff, g: 0xff, b: 0xff, a: 1.0 } },
|
||||||
{ percentage: 1, color: { r: 0x00, g: 0xff, b: 0x00, a: 1.0 } }
|
{ percentage: 1, color: { r: 0x00, g: 0xff, b: 0x00, a: 1.0 } },
|
||||||
],
|
],
|
||||||
pidSlider: [
|
pidSlider: [
|
||||||
{ percentage: -1, color: { r: 0xc5, g: 0xc5, b: 0xc5, a: 1.0 } },
|
{ percentage: -1, color: { r: 0xc5, g: 0xc5, b: 0xc5, a: 1.0 } },
|
||||||
{ percentage: 0, color: { r: 0xff, g: 0xff, b: 0xff, a: 0.0 } },
|
{ percentage: 0, color: { r: 0xff, g: 0xff, b: 0xff, a: 0.0 } },
|
||||||
{ percentage: 1, color: { r: 0xff, g: 0x54, b: 0x0e, a: 1.0 } }
|
{ percentage: 1, color: { r: 0xff, g: 0x54, b: 0x0e, a: 1.0 } },
|
||||||
]
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Stack Overflow: https://stackoverflow.com/a/7128796/4107016
|
// Stack Overflow: https://stackoverflow.com/a/7128796/4107016
|
||||||
|
@ -41,7 +41,7 @@ CSSUtil.prototype.getColorForPercentage = function(percentage, colorTable = null
|
||||||
r: Math.floor(lower.color.r * percentageLower + upper.color.r * percentageUpper),
|
r: Math.floor(lower.color.r * percentageLower + upper.color.r * percentageUpper),
|
||||||
g: Math.floor(lower.color.g * percentageLower + upper.color.g * percentageUpper),
|
g: Math.floor(lower.color.g * percentageLower + upper.color.g * percentageUpper),
|
||||||
b: Math.floor(lower.color.b * percentageLower + upper.color.b * percentageUpper),
|
b: Math.floor(lower.color.b * percentageLower + upper.color.b * percentageUpper),
|
||||||
a: lower.color.a * percentageLower + upper.color.a * percentageUpper
|
a: lower.color.a * percentageLower + upper.color.a * percentageUpper,
|
||||||
};
|
};
|
||||||
return "rgba(" + [color.r, color.g, color.b, color.a].join(",") + ")";
|
return "rgba(" + [color.r, color.g, color.b, color.a].join(",") + ")";
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ windowWatcherUtil.bindWatchers = function(windowObject, watchersObject) {
|
||||||
set(target, prop, val, receiver) {
|
set(target, prop, val, receiver) {
|
||||||
windowWatcherUtil.invokeWatcher(prop, val, watchersObject);
|
windowWatcherUtil.invokeWatcher(prop, val, watchersObject);
|
||||||
return Reflect.set(target, prop, val, receiver);
|
return Reflect.set(target, prop, val, receiver);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ windowWatcherUtil.passValue = function(windows, key, val) {
|
||||||
win.contentWindow.bindings[key] = val;
|
win.contentWindow.bindings[key] = val;
|
||||||
} else {
|
} else {
|
||||||
win.contentWindow.bindings = {
|
win.contentWindow.bindings = {
|
||||||
[key]: val
|
[key]: val,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue