diff --git a/.eslintrc.js b/.eslintrc.js index 239fb5fc..7cdd9cd1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { parserOptions: { ecmaVersion: 2020, - sourceType: "module" + sourceType: "module", }, extends: ["plugin:vue/recommended"], env: { @@ -9,11 +9,12 @@ module.exports = { jquery: true, es2017: true, browser: true, - webextensions: true + webextensions: true, }, rules: { "no-trailing-spaces": "error", "eol-last": "error", - semi: "error" - } -} + semi: "error", + "comma-dangle": ["error", "always-multiline"], + }, +}; diff --git a/gulpfile.js b/gulpfile.js index d22779bc..7d7769a9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -424,7 +424,7 @@ function dist_rollup() { // accordingly inside of `dist` entryFileNames: '[name].js', dir: DIST_DIR, - }) + }), ); } @@ -559,7 +559,7 @@ function injectARMCache(flavor, done) { process.exit(1); } done(); - } + }, ); } }); @@ -828,7 +828,7 @@ function release_osx64(appDirectory) { }, }, }, - }) + }), ); } diff --git a/src/components/MotorOutputReordering/MotorOutputReorderingConfig.js b/src/components/MotorOutputReordering/MotorOutputReorderingConfig.js index 6a5cbef7..bf02253b 100644 --- a/src/components/MotorOutputReordering/MotorOutputReorderingConfig.js +++ b/src/components/MotorOutputReordering/MotorOutputReorderingConfig.js @@ -231,8 +231,8 @@ class MotorOutputReorderConfig ArmWidth: 0.1 * screenSize, Motors: [ - {x: -frameRadius, y: 0,}, - {x: frameRadius, y: 0,}, + {x: -frameRadius, y: 0}, + {x: frameRadius, y: 0}, ], }; } diff --git a/src/js/Analytics.js b/src/js/Analytics.js index ed1ec44e..2c06f74e 100644 --- a/src/js/Analytics.js +++ b/src/js/Analytics.js @@ -10,7 +10,7 @@ const Analytics = function (trackingId, userId, appName, appVersion, gitRevision this._googleAnalytics.initialize(this._trackingId, { storage: 'none', clientId: userId, - debug: !!debugMode + debug: !!debugMode, }); // Make it work for the Chrome App: diff --git a/src/js/Beepers.js b/src/js/Beepers.js index acf1aaf8..b31c9b36 100644 --- a/src/js/Beepers.js +++ b/src/js/Beepers.js @@ -30,13 +30,13 @@ class Beepers { beepers.push( { bit: 19, name: 'CRASH_FLIP', 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)) { beepers.push( - { bit: 22, name: 'RC_SMOOTHING_INIT_FAIL', visible: true } + { bit: 22, name: 'RC_SMOOTHING_INIT_FAIL', visible: true }, ); } diff --git a/src/js/CliAutoComplete.js b/src/js/CliAutoComplete.js index 793587d9..31df997c 100644 --- a/src/js/CliAutoComplete.js +++ b/src/js/CliAutoComplete.js @@ -276,7 +276,7 @@ CliAutoComplete._initTextcomplete = function() { }, 0); } }, - } + }, ) .on('textComplete:show', function() { /** diff --git a/src/js/Clipboard.js b/src/js/Clipboard.js index 75693729..4b181faf 100644 --- a/src/js/Clipboard.js +++ b/src/js/Clipboard.js @@ -10,7 +10,7 @@ const Clipboard = { readAvailable : null, writeAvailable : null, writeText : null, - readText : null + readText : null, }; Clipboard._configureClipboardAsNwJs = function(nwGui) { diff --git a/src/js/ConfigInserter.js b/src/js/ConfigInserter.js index 72ea4f4c..cc59ea6a 100644 --- a/src/js/ConfigInserter.js +++ b/src/js/ConfigInserter.js @@ -11,7 +11,7 @@ function seek(firmware, address) { for (; index < firmware.data.length && address >= firmware.data[index].address + firmware.data[index].bytes; index++); const result = { - lineIndex: index + lineIndex: index, }; if (firmware.data[index] && address >= firmware.data[index].address) { @@ -67,7 +67,7 @@ function generateData(firmware, input, startAddress) { const line = { address: address, bytes: BLOCK_SIZE > remaining ? remaining : BLOCK_SIZE, - data: [] + data: [], }; if (firmware.data[index.lineIndex] && (line.address + line.bytes) > firmware.data[index.lineIndex].address) { diff --git a/src/js/ConfigStorage.js b/src/js/ConfigStorage.js index 435dba27..e9fc02d5 100644 --- a/src/js/ConfigStorage.js +++ b/src/js/ConfigStorage.js @@ -38,5 +38,5 @@ const ConfigStorage = { tmpObj[element] = input[element]; window.localStorage.setItem(element, JSON.stringify(tmpObj)); }); - } + }, }; diff --git a/src/js/Features.js b/src/js/Features.js index 4a1a24fc..fc674028 100644 --- a/src/js/Features.js +++ b/src/js/Features.js @@ -18,59 +18,59 @@ const Features = function (config) { {bit: 14, group: 'rxMode', mode: 'select', name: 'RX_MSP'}, {bit: 15, group: 'rssi', name: 'RSSI_ADC'}, {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)) { 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")) { 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)) { 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")) { features.push( - {bit: 21, group: 'other', name: 'TRANSPONDER', haveTip: true} + {bit: 21, group: 'other', name: 'TRANSPONDER', haveTip: true}, ); } if (config.flightControllerVersion !== '') { if (semver.gte(FC.CONFIG.apiVersion, "1.16.0")) { 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.lt(FC.CONFIG.apiVersion, "1.20.0")) { 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)) { features.push( - {bit: 23, group: 'other', name: 'SDCARD'} + {bit: 23, group: 'other', name: 'SDCARD'}, ); } } if (semver.gte(FC.CONFIG.apiVersion, "1.20.0")) { features.push( - {bit: 18, group: 'other', name: 'OSD'} + {bit: 18, group: 'other', name: 'OSD'}, ); if (!semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_35)) { 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)) { features.push( {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)) { 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 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)) { features.push( {bit: 1, group: 'batteryVoltage', name: 'VBAT'}, - {bit: 11, group: 'batteryCurrent', name: 'CURRENT_METER'} + {bit: 11, group: 'batteryCurrent', name: 'CURRENT_METER'}, ); } } diff --git a/src/js/LogoManager.js b/src/js/LogoManager.js index ac49681f..5dfc1ea1 100644 --- a/src/js/LogoManager.js +++ b/src/js/LogoManager.js @@ -268,7 +268,7 @@ LogoManager.replaceLogoInFont = function (img) { x * this.font.constants.SIZES.CHAR_WIDTH, y * this.font.constants.SIZES.CHAR_HEIGHT, this.font.constants.SIZES.CHAR_WIDTH, - this.font.constants.SIZES.CHAR_HEIGHT + this.font.constants.SIZES.CHAR_HEIGHT, ), newChar = imageToCharacter.apply(this, [imageData.data]); replaceChar.apply(this, [newChar, charAddr]); diff --git a/src/js/backup_restore.js b/src/js/backup_restore.js index ee64f598..0217a3cb 100644 --- a/src/js/backup_restore.js +++ b/src/js/backup_restore.js @@ -24,7 +24,7 @@ function configuration_backup(callback) { MSPCodes.MSP_ACC_TRIM, MSPCodes.MSP_SERVO_CONFIGURATIONS, MSPCodes.MSP_MODE_RANGES, - MSPCodes.MSP_ADJUSTMENT_RANGES + MSPCodes.MSP_ADJUSTMENT_RANGES, ]; function update_profile_specific_data_list() { @@ -71,7 +71,7 @@ function configuration_backup(callback) { 'ServoConfig': jQuery.extend(true, [], FC.SERVO_CONFIG), 'ServoRules': jQuery.extend(true, [], FC.SERVO_RULES), '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")) { @@ -96,7 +96,7 @@ function configuration_backup(callback) { MSPCodes.MSP_RX_MAP, MSPCodes.MSP_CF_SERIAL_CONFIG, MSPCodes.MSP_LED_STRIP_CONFIG, - MSPCodes.MSP_LED_COLORS + MSPCodes.MSP_LED_COLORS, ]; function update_unique_data_list() { @@ -211,7 +211,7 @@ function configuration_backup(callback) { const filename = generateFilename(prefix, suffix); const accepts = [{ - description: suffix.toUpperCase() + ' files', extensions: [suffix] + description: suffix.toUpperCase() + ' files', extensions: [suffix], }]; // create or load the file @@ -282,7 +282,7 @@ function configuration_restore(callback) { let chosenFileEntry = null; const accepts = [{ - description: 'JSON files', extensions: ['json'] + description: 'JSON files', extensions: ['json'], }]; // load up the file @@ -396,7 +396,7 @@ function configuration_restore(callback) { if (!configuration.PIDs && configuration.PID) { configuration.PIDs = 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); } configuration.SERIAL_CONFIG = { - ports: ports + ports: ports, }; GUI.log(i18n.getMessage('configMigratedTo', [migratedVersion])); @@ -496,14 +496,14 @@ function configuration_restore(callback) { if (configuration.FC_CONFIG == undefined) { configuration.FC_CONFIG = { - loopTime: 3500 + loopTime: 3500, }; } if (configuration.ARMING_CONFIG == undefined) { configuration.ARMING_CONFIG = { auto_disarm_delay: 5, - disarm_kill_switch: 1 + disarm_kill_switch: 1, }; } @@ -578,7 +578,7 @@ function configuration_restore(callback) { deadband3d_low: 1406, deadband3d_high: 1514, neutral: 1460, - deadband3d_throttle: 50 + deadband3d_throttle: 50, }; } @@ -603,7 +603,7 @@ function configuration_restore(callback) { configuration.SENSOR_ALIGNMENT = { align_gyro: 0, align_acc: 0, - align_mag: 0 + align_mag: 0, }; } @@ -617,7 +617,7 @@ function configuration_restore(callback) { stick_min: 1100, stick_max: 1900, rx_min_usec: 885, - rx_max_usec: 2115 + rx_max_usec: 2115, }; } @@ -628,7 +628,7 @@ function configuration_restore(callback) { failsafe_throttle: 1000, failsafe_switch_mode: 0, 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: 875} + {mode: 0, value: 875}, ]; for (let i = 0; i < 14; i++) { const rxfailChannel = { mode: 1, - value: 1500 + value: 1500, }; configuration.RXFAIL_CONFIG.push(rxfailChannel); } @@ -698,7 +698,7 @@ function configuration_restore(callback) { MSPCodes.MSP_SET_PID_CONTROLLER, MSPCodes.MSP_SET_PID, MSPCodes.MSP_SET_RC_TUNING, - MSPCodes.MSP_SET_ACC_TRIM + MSPCodes.MSP_SET_ACC_TRIM, ]; if (semver.gte(FC.CONFIG.apiVersion, "1.15.0")) { @@ -772,7 +772,7 @@ function configuration_restore(callback) { const defaultModeRangeExtra = { modeId: FC.MODE_RANGES[modeIndex].modeId, modeLogic: 0, - linkedTo: 0 + linkedTo: 0, }; FC.MODE_RANGES_EXTRA.push(defaultModeRangeExtra); } @@ -797,7 +797,7 @@ function configuration_restore(callback) { const uniqueData = [ MSPCodes.MSP_SET_RX_MAP, - MSPCodes.MSP_SET_CF_SERIAL_CONFIG + MSPCodes.MSP_SET_CF_SERIAL_CONFIG, ]; function update_unique_data_list() { diff --git a/src/js/boards.js b/src/js/boards.js index 805a50bd..1e8a7aa5 100644 --- a/src/js/boards.js +++ b/src/js/boards.js @@ -78,7 +78,7 @@ const BOARD_DEFINITIONS = [ ]; const DEFAULT_BOARD_DEFINITION = { - name: "Unknown", identifier: "????", vcp: false + name: "Unknown", identifier: "????", vcp: false, }; const BOARD = {}; diff --git a/src/js/jenkins_loader.js b/src/js/jenkins_loader.js index 1fbd2164..11716670 100644 --- a/src/js/jenkins_loader.js +++ b/src/js/jenkins_loader.js @@ -94,7 +94,7 @@ JenkinsLoader.prototype.loadBuilds = function (jobName, callback) { number: build.number, artifacts: build.artifacts.map(artifact => artifact.relativePath), changes: build.changeSet.items.map(item => `* ${item.msg}`).join('
\n'), - timestamp: build.timestamp + timestamp: build.timestamp, })); // cache loaded info @@ -148,7 +148,7 @@ JenkinsLoader.prototype._parseBuilds = function (jobUrl, jobName, builds, callba 'file' : relativePath.split('/').slice(-1)[0], 'target' : target, 'date' : formattedDate, - 'notes' : build.changes + 'notes' : build.changes, }; if (targetBuilds[target]) { diff --git a/src/js/main.js b/src/js/main.js index 70cf6b34..496cc31b 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -45,7 +45,7 @@ function appReady() { function checkSetupAnalytics(callback) { if (!analytics) { setTimeout(function () { - ConfigStorage.get(['userId', 'analyticsOptOut', 'checkForConfiguratorUnstableVersions', ], function (result) { + ConfigStorage.get(['userId', 'analyticsOptOut', 'checkForConfiguratorUnstableVersions' ], function (result) { if (!analytics) { setupAnalytics(result); } @@ -200,7 +200,7 @@ function startProcess() { } }, i18n.getMessage('cordovaExitAppTitle'), - [i18n.getMessage('yes'),i18n.getMessage('no')] + [i18n.getMessage('yes'),i18n.getMessage('no')], ); }); } @@ -305,27 +305,27 @@ function startProcess() { switch (tab) { case 'landing': import("./tabs/landing").then(({ landing }) => - landing.initialize(content_ready) + landing.initialize(content_ready), ); break; case 'changelog': import("./tabs/static_tab").then(({ staticTab }) => - staticTab.initialize("changelog", content_ready) + staticTab.initialize("changelog", content_ready), ); break; case 'privacy_policy': import("./tabs/static_tab").then(({ staticTab }) => - staticTab.initialize("privacy_policy", content_ready) + staticTab.initialize("privacy_policy", content_ready), ); break; case 'options': import("./tabs/options").then(({ options }) => - options.initialize(content_ready) + options.initialize(content_ready), ); break; case 'firmware_flasher': import("./tabs/firmware_flasher").then(({ firmware_flasher }) => - firmware_flasher.initialize(content_ready) + firmware_flasher.initialize(content_ready), ); break; case 'help': diff --git a/src/js/msp.js b/src/js/msp.js index 5f31b848..5e44749c 100644 --- a/src/js/msp.js +++ b/src/js/msp.js @@ -389,5 +389,5 @@ const MSP = { this.packet_error = 0; // reset CRC packet error counter for next session this.callbacks_cleanup(); - } + }, }; diff --git a/src/js/port_usage.js b/src/js/port_usage.js index adfe9521..a7c3c68e 100644 --- a/src/js/port_usage.js +++ b/src/js/port_usage.js @@ -34,5 +34,5 @@ const PortUsage = { this.port_usage_down = 0; this.port_usage_up = 0; - } + }, }; diff --git a/src/js/protocols/stm32.js b/src/js/protocols/stm32.js index 2afa8894..000f1ed4 100644 --- a/src/js/protocols/stm32.js +++ b/src/js/protocols/stm32.js @@ -26,7 +26,7 @@ const STM32_protocol = function () { this.status = { ACK: 0x79, // y - NACK: 0x1F + NACK: 0x1F, }; this.command = { @@ -41,7 +41,7 @@ const STM32_protocol = function () { write_protect: 0x63, // Enables the write protection for some sectors write_unprotect: 0x73, // Disables the write protection for all Flash memory sectors 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. @@ -63,7 +63,7 @@ STM32_protocol.prototype.connect = function (port, baud, hex, options, callback) self.options = { no_reboot: false, reboot_baud: false, - erase_chip: false + erase_chip: false, }; if (options.no_reboot) { diff --git a/src/js/protocols/stm32usbdfu.js b/src/js/protocols/stm32usbdfu.js index a334378a..3a3c875c 100644 --- a/src/js/protocols/stm32usbdfu.js +++ b/src/js/protocols/stm32usbdfu.js @@ -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). 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. - 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 = { @@ -45,7 +45,7 @@ var STM32DFU_protocol = function () { errUSBR: 0x0C, // Device detected unexpected USB reset signaling. errPOR: 0x0D, // Device detected unexpected power on reset. 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 = { @@ -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_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. - 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 @@ -189,7 +189,7 @@ STM32DFU_protocol.prototype.getString = function (index, callback) { 'request': 6, 'value': 0x300 | index, 'index': 0, // specifies language - 'length': 255 // max length to retreive + 'length': 255, // max length to retreive }, function (result) { if (checkChromeRuntimeError()) { console.log('USB getString failed! ' + result.resultCode); @@ -258,7 +258,7 @@ STM32DFU_protocol.prototype.getInterfaceDescriptor = function (_interface, callb 'request': 6, 'value': 0x200, 'index': 0, - 'length': 18 + _interface * 9 + 'length': 18 + _interface * 9, }, function (result) { if (checkChromeRuntimeError()) { console.log('USB getInterfaceDescriptor failed! ' + result.resultCode); @@ -276,7 +276,7 @@ STM32DFU_protocol.prototype.getInterfaceDescriptor = function (_interface, callb 'bInterfaceClass': buf[5], 'bInterfaceSubclass': buf[6], 'bInterfaceProtocol': buf[7], - 'iInterface': buf[8] + 'iInterface': buf[8], }; callback(descriptor, result.resultCode); @@ -292,7 +292,7 @@ STM32DFU_protocol.prototype.getFunctionalDescriptor = function (_interface, call 'request': 6, 'value': 0x2100, 'index': 0, - 'length': 255 + 'length': 255, }, function (result) { if (checkChromeRuntimeError()) { console.log('USB getFunctionalDescriptor failed! ' + result.resultCode); @@ -308,7 +308,7 @@ STM32DFU_protocol.prototype.getFunctionalDescriptor = function (_interface, call 'bmAttributes': buf[2], 'wDetachTimeOut': (buf[4] << 8)|buf[3], 'wTransferSize': (buf[6] << 8)|buf[5], - 'bcdDFUVersion': buf[7] + 'bcdDFUVersion': buf[7], }; callback(descriptor, result.resultCode); @@ -397,7 +397,7 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) { 'num_pages' : num_pages, 'start_address': start_address + total_size, 'page_size' : 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, 'start_address': start_address, 'sectors' : sectors, - 'total_size' : total_size + 'total_size' : total_size, }; return memory; }; @@ -440,7 +440,7 @@ STM32DFU_protocol.prototype.controlTransfer = function (direction, request, valu 'value': value, 'index': _interface, 'length': length, - 'timeout': timeout + 'timeout': timeout, }, function (result) { if (checkChromeRuntimeError()) { console.log('USB controlTransfer IN failed for request ' + request + '!'); @@ -468,7 +468,7 @@ STM32DFU_protocol.prototype.controlTransfer = function (direction, request, valu 'value': value, 'index': _interface, 'data': arrayBuf, - 'timeout': timeout + 'timeout': timeout, }, function (result) { if (checkChromeRuntimeError()) { console.log('USB controlTransfer OUT failed for request ' + request + '!'); diff --git a/src/js/serial.js b/src/js/serial.js index 02e79b1e..a282137f 100644 --- a/src/js/serial.js +++ b/src/js/serial.js @@ -391,7 +391,7 @@ const serial = { break; } } - } + }, }, onReceiveError: { listeners: [], @@ -411,7 +411,7 @@ const serial = { break; } } - } + }, }, emptyOutputBuffer: function () { this.outputBuffer = []; diff --git a/src/js/serial_backend.js b/src/js/serial_backend.js index fa00861a..4a5a18d7 100644 --- a/src/js/serial_backend.js +++ b/src/js/serial_backend.js @@ -695,7 +695,7 @@ function update_live_status() { const statuswrapper = $('#quad-status_wrapper'); $(".quad-status-contents").css({ - display: 'inline-block' + display: 'inline-block', }); if (GUI.active_tab !== 'cli' && GUI.active_tab !== 'presets') { @@ -806,25 +806,25 @@ function update_dataflash_global() { if (supportsDataflash){ $(".noflash_global").css({ - display: 'none' + display: 'none', }); $(".dataflash-contents_global").css({ - display: 'block' + display: 'block', }); $(".dataflash-free_global").css({ 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)); } else { $(".noflash_global").css({ - display: 'block' + display: 'block', }); $(".dataflash-contents_global").css({ - display: 'none' + display: 'none', }); } } diff --git a/src/js/tabs/adjustments.js b/src/js/tabs/adjustments.js index 6ecafe3a..a1f32d7f 100644 --- a/src/js/tabs/adjustments.js +++ b/src/js/tabs/adjustments.js @@ -88,7 +88,7 @@ TABS.adjustments.initialize = function (callback) { const channel_range = { 'min': [ 900 ], - 'max': [ 2100 ] + 'max': [ 2100 ], }; let rangeValues = [1300, 1700]; @@ -106,8 +106,8 @@ TABS.adjustments.initialize = function (callback) { connect: true, range: channel_range, format: wNumb({ - decimals: 0 - }) + decimals: 0, + }), }); $(newAdjustment).find('.channel-slider').Link('lower').to($(newAdjustment).find('.lowerLimitValue')); @@ -117,7 +117,7 @@ TABS.adjustments.initialize = function (callback) { mode: 'values', values: [900, 1000, 1200, 1400, 1500, 1600, 1800, 2000, 2100], density: 4, - stepped: true + stepped: true, }); // @@ -187,10 +187,10 @@ TABS.adjustments.initialize = function (callback) { auxChannelIndex: 0, range: { start: 900, - end: 900 + end: 900, }, adjustmentFunction: 0, - auxSwitchChannelIndex: 0 + auxSwitchChannelIndex: 0, }; $('.tab-adjustments .adjustments .adjustment').each(function () { @@ -208,10 +208,10 @@ TABS.adjustments.initialize = function (callback) { auxChannelIndex: parseInt($(this).find('.channelInfo .channel').val()), range: { start: rangeValues[0], - end: rangeValues[1] + end: rangeValues[1], }, 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); } else { diff --git a/src/js/tabs/auxiliary.js b/src/js/tabs/auxiliary.js index ad9f962e..2a0d0019 100644 --- a/src/js/tabs/auxiliary.js +++ b/src/js/tabs/auxiliary.js @@ -140,7 +140,7 @@ TABS.auxiliary.initialize = function (callback) { const channel_range = { 'min': [ 900 ], - 'max': [ 2100 ] + 'max': [ 2100 ], }; 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, format: wNumb({ decimals: 0, - }) + }), }); const elementName = '#mode-' + modeIndex + '-range-' + rangeIndex; @@ -184,7 +184,7 @@ TABS.auxiliary.initialize = function (callback) { mode: 'values', values: sliderValues, density: 4, - stepped: true + stepped: true, }); $(rangeElement).find('.deleteRange').data('rangeElement', rangeElement); @@ -269,7 +269,7 @@ TABS.auxiliary.initialize = function (callback) { let modeRangeExtra = { id: modeRange.id, modeLogic: 0, - linkedTo: 0 + linkedTo: 0, }; if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_41)) { modeRangeExtra = FC.MODE_RANGES_EXTRA[modeRangeIndex]; @@ -333,15 +333,15 @@ TABS.auxiliary.initialize = function (callback) { auxChannelIndex: parseInt($(this).find('.channel').val()), range: { start: rangeValues[0], - end: rangeValues[1] - } + end: rangeValues[1], + }, }; FC.MODE_RANGES.push(modeRange); const modeRangeExtra = { id: modeId, modeLogic: parseInt($(this).find('.logic').val()), - linkedTo: 0 + linkedTo: 0, }; FC.MODE_RANGES_EXTRA.push(modeRangeExtra); }); @@ -357,15 +357,15 @@ TABS.auxiliary.initialize = function (callback) { auxChannelIndex: 0, range: { start: 900, - end: 900 - } + end: 900, + }, }; FC.MODE_RANGES.push(modeRange); const modeRangeExtra = { id: modeId, modeLogic: parseInt($(this).find('.logic').val()), - linkedTo: linkedToSelection + linkedTo: linkedToSelection, }; FC.MODE_RANGES_EXTRA.push(modeRangeExtra); } @@ -378,15 +378,15 @@ TABS.auxiliary.initialize = function (callback) { auxChannelIndex: 0, range: { start: 900, - end: 900 - } + end: 900, + }, }; FC.MODE_RANGES.push(defaultModeRange); const defaultModeRangeExtra = { id: 0, modeLogic: 0, - linkedTo: 0 + linkedTo: 0, }; FC.MODE_RANGES_EXTRA.push(defaultModeRangeExtra); } diff --git a/src/js/tabs/failsafe.js b/src/js/tabs/failsafe.js index 30df283f..12c0b7a7 100644 --- a/src/js/tabs/failsafe.js +++ b/src/js/tabs/failsafe.js @@ -127,7 +127,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { i18n.getMessage('controlAxisRoll'), i18n.getMessage('controlAxisPitch'), i18n.getMessage('controlAxisYaw'), - i18n.getMessage('controlAxisThrottle') + i18n.getMessage('controlAxisThrottle'), ], fullChannels_e = $('div.activechannellist'); let aux_index = 1, diff --git a/src/js/tabs/firmware_flasher.js b/src/js/tabs/firmware_flasher.js index 28adab9c..b3c55cbf 100644 --- a/src/js/tabs/firmware_flasher.js +++ b/src/js/tabs/firmware_flasher.js @@ -214,7 +214,7 @@ firmware_flasher.initialize = function (callback) { "file" : asset.name, "target" : target, "date" : formattedDate, - "notes" : release.body + "notes" : release.body, }; releases[target].push(descriptor); }); @@ -323,24 +323,24 @@ firmware_flasher.initialize = function (callback) { const buildTypes = [ { tag: 'firmwareFlasherOptionLabelBuildTypeRelease', - loader: () => self.releaseChecker.loadReleaseData(releaseData => processBoardOptions(releaseData, false)) + loader: () => self.releaseChecker.loadReleaseData(releaseData => processBoardOptions(releaseData, false)), }, { 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 => { if (job.title === "Development") { return { tag: "firmwareFlasherOptionLabelBuildTypeDevelopment", - loader: () => self.jenkinsLoader.loadBuilds(job.name, loadUnifiedBuilds) + loader: () => self.jenkinsLoader.loadBuilds(job.name, loadUnifiedBuilds), }; } return { 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) { $( `` - ) + }`, + ), ); }); buildType_e.val($('select[name="build_type"] option:first').val()); @@ -460,9 +460,9 @@ firmware_flasher.initialize = function (callback) { versions_element.append( $( `` - ) + "firmwareFlasherOptionLabelSelectFirmwareVersionFor", + )} ${target}`, + ), ); targetVersions .sort(sortVersions) @@ -580,9 +580,9 @@ firmware_flasher.initialize = function (callback) { versions_e.append( $( `` - ) + "firmwareFlasherOptionLabelSelectFirmwareVersion", + )}`, + ), ); } else { // 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( $( `` - ) + "firmwareFlasherOptionLoading", + )}`, + ), ); const builds = []; @@ -967,9 +967,9 @@ firmware_flasher.initialize = function (callback) { accepts: [ { description: 'target files', - extensions: ['hex', 'config'] - } - ] + extensions: ['hex', 'config'], + }, + ], }, function (fileEntry) { if (checkChromeRuntimeError()) { return; diff --git a/src/js/tabs/gps.js b/src/js/tabs/gps.js index ca5df286..e11d2b74 100644 --- a/src/js/tabs/gps.js +++ b/src/js/tabs/gps.js @@ -123,7 +123,7 @@ TABS.gps.initialize = function (callback) { const message = { action: 'center', lat: lat, - lon: lon + lon: lon, }; frame = document.getElementById('map'); @@ -190,7 +190,7 @@ TABS.gps.initialize = function (callback) { $('#zoom_in').click(function() { console.log('zoom in'); const message = { - action: 'zoom_in' + action: 'zoom_in', }; frame.contentWindow.postMessage(message, '*'); }); @@ -198,7 +198,7 @@ TABS.gps.initialize = function (callback) { $('#zoom_out').click(function() { console.log('zoom out'); const message = { - action: 'zoom_out' + action: 'zoom_out', }; frame.contentWindow.postMessage(message, '*'); }); diff --git a/src/js/tabs/landing.js b/src/js/tabs/landing.js index 5d9912a8..ece7d0a3 100644 --- a/src/js/tabs/landing.js +++ b/src/js/tabs/landing.js @@ -54,5 +54,5 @@ landing.cleanup = function (callback) { // TODO: remove after all is using modules window.TABS.landing = landing; export { - landing + landing, }; diff --git a/src/js/tabs/led_strip.js b/src/js/tabs/led_strip.js index 2e46b474..6329790e 100644 --- a/src/js/tabs/led_strip.js +++ b/src/js/tabs/led_strip.js @@ -2,7 +2,7 @@ TABS.led_strip = { 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")) { colorDefineSliders.hide(); } - } + }, }); $('.funcWire').click(function() { @@ -422,7 +422,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) { directionsInSelection.forEach(function(direction_e) { $(direction_e).addClass('btnOn'); }); - } + }, }); // UI: select LED function from drop-down @@ -691,7 +691,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) { x: 0, y: 0, directions: '', - functions: '' + functions: '', }; for (let i = 0; i < ledStripLength; i++) { diff --git a/src/js/tabs/map.js b/src/js/tabs/map.js index 1b2e929e..7c9f0217 100644 --- a/src/js/tabs/map.js +++ b/src/js/tabs/map.js @@ -19,55 +19,55 @@ function initializeMap() { mapView = new ol.View({ center: lonLat, - zoom: DEFAULT_ZOOM + zoom: DEFAULT_ZOOM, }); map = new ol.Map({ target: 'map-canvas', layers: [ new ol.layer.Tile({ - source: new ol.source.OSM() - }) + source: new ol.source.OSM(), + }), ], view: mapView, - controls: [] + controls: [], }); const icon = new ol.style.Icon(({ anchor: [0.5, 1], opacity: 1, scale: 0.5, - src: ICON_IMAGE + src: ICON_IMAGE, })); const iconNoFix = new ol.style.Icon(({ anchor: [0.5, 1], opacity: 1, scale: 0.5, - src: ICON_IMAGE_NOFIX + src: ICON_IMAGE_NOFIX, })); iconStyle = new ol.style.Style({ - image: icon + image: icon, }); iconStyleNoFix = new ol.style.Style({ - image: iconNoFix + image: iconNoFix, }); iconGeometry = new ol.geom.Point(lonLat); iconFeature = new ol.Feature({ - geometry: iconGeometry + geometry: iconGeometry, }); iconFeature.setStyle(iconStyle); const vectorSource = new ol.source.Vector({ - features: [iconFeature] + features: [iconFeature], }); const currentPositionLayer = new ol.layer.Vector({ - source: vectorSource + source: vectorSource, }); map.addLayer(currentPositionLayer); diff --git a/src/js/tabs/motors.js b/src/js/tabs/motors.js index 91e6d351..e18d451e 100644 --- a/src/js/tabs/motors.js +++ b/src/js/tabs/motors.js @@ -418,7 +418,7 @@ TABS.motors.initialize = function (callback) { x: [], y: [], z: [], - rms: [] + rms: [], }; $('.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 = [ FC.SENSOR_DATA.gyroscope[0], FC.SENSOR_DATA.gyroscope[1], - FC.SENSOR_DATA.gyroscope[2] + FC.SENSOR_DATA.gyroscope[2], ]; updateGraphHelperSize(gyroHelpers); diff --git a/src/js/tabs/onboard_logging.js b/src/js/tabs/onboard_logging.js index ff9cc5a5..f8a294c1 100644 --- a/src/js/tabs/onboard_logging.js +++ b/src/js/tabs/onboard_logging.js @@ -8,7 +8,7 @@ TABS.onboard_logging = { BLOCK_SIZE: 4096, VCP_BLOCK_SIZE_3_0: 512, - VCP_BLOCK_SIZE: 4096 + VCP_BLOCK_SIZE: 4096, }; TABS.onboard_logging.initialize = function (callback) { const self = this; @@ -251,7 +251,7 @@ TABS.onboard_logging.initialize = function (callback) { {num: 1, denom: 7}, {num: 1, denom: 8}, {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) { bar.css({ width: (value / total * 100) + "%", - display: 'block' + display: 'block', }); $("div", bar).text((label ? label + " " : "") + (valuesAreKilobytes ? formatFilesizeKilobytes(value) : formatFilesizeBytes(value))); } else { bar.css({ - display: 'none' + display: 'none', }); } } diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 82e9826d..d4e7c718 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -2569,7 +2569,7 @@ TABS.osd.initialize = function(callback) { .append($(`${videoFormatOptionText}`) .prop('checked', i === OSD.data.video_system) .data('type', type) - .data('type', i) + .data('type', i), ); $videoTypes.append($checkbox); } @@ -2592,7 +2592,7 @@ TABS.osd.initialize = function(callback) { .append($(`${setupUnitOptionText}`) .prop('checked', i === OSD.data.unit_mode) .data('type', type) - .data('type', i) + .data('type', i), ); $unitMode.append($checkbox); } @@ -2739,7 +2739,7 @@ TABS.osd.initialize = function(callback) { .then(function() { updateOsdView(); }); - }) + }), ); $field.append(``); @@ -2783,7 +2783,7 @@ TABS.osd.initialize = function(callback) { .then(function() { updateOsdView(); }); - }) + }), ); const finalFieldName = titleizeField(field); @@ -2912,7 +2912,7 @@ TABS.osd.initialize = function(callback) { .then(function() { updateOsdView(); }); - }) + }), ); } @@ -2957,7 +2957,7 @@ TABS.osd.initialize = function(callback) { .then(function() { updateOsdView(); }); - })) + })), ); } diff --git a/src/js/tabs/pid_tuning.js b/src/js/tabs/pid_tuning.js index caef2ee8..b490bf4b 100644 --- a/src/js/tabs/pid_tuning.js +++ b/src/js/tabs/pid_tuning.js @@ -1453,7 +1453,7 @@ TABS.pid_tuning.initialize = function (callback) { yawDeadband: FC.RC_DEADBAND_CONFIG.yaw_deadband, roll_rate_limit: FC.RC_TUNING.roll_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")) { @@ -1764,18 +1764,18 @@ TABS.pid_tuning.initialize = function (callback) { {name: "LuxFloat"}, {name: "MultiWii (2.3 - latest)"}, {name: "MultiWii (2.3 - hybrid)"}, - {name: "Harakiri"} + {name: "Harakiri"}, ]; } else if (semver.lt(FC.CONFIG.apiVersion, "1.20.0")) { pidControllerList = [ {name: ""}, {name: "Integer"}, - {name: "Float"} + {name: "Float"}, ]; } else { pidControllerList = [ {name: "Legacy"}, - {name: "Betaflight"} + {name: "Betaflight"}, ]; } @@ -2852,7 +2852,7 @@ TABS.pid_tuning.updateRatesLabels = function() { const BALLOON_COLORS = { 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'}, - 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); diff --git a/src/js/tabs/power.js b/src/js/tabs/power.js index 9144232e..62e7325d 100644 --- a/src/js/tabs/power.js +++ b/src/js/tabs/power.js @@ -76,7 +76,7 @@ TABS.power.initialize = function (callback) { voltageDataSource[index] = { vbatscale: parseInt($(`input[name="vbatscale-${index}"]`).val()), vbatresdivval: parseInt($(`input[name="vbatresdivval-${index}"]`).val()), - vbatresdivmultiplier: parseInt($(`input[name="vbatresdivmultiplier-${index}"]`).val()) + vbatresdivmultiplier: parseInt($(`input[name="vbatresdivmultiplier-${index}"]`).val()), }; } } diff --git a/src/js/tabs/receiver.js b/src/js/tabs/receiver.js index e8a98014..cb468f20 100644 --- a/src/js/tabs/receiver.js +++ b/src/js/tabs/receiver.js @@ -109,7 +109,7 @@ TABS.receiver.initialize = function (callback) { i18n.getMessage('controlAxisRoll'), i18n.getMessage('controlAxisPitch'), i18n.getMessage('controlAxisYaw'), - i18n.getMessage('controlAxisThrottle') + i18n.getMessage('controlAxisThrottle'), ]; 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 const meterScale = { 'min': 800, - 'max': 2200 + 'max': 2200, }; const meterFillArray = []; @@ -288,7 +288,7 @@ TABS.receiver.initialize = function (callback) { 'FRSKY_X', 'A7105_FLYSKY', 'A7105_FLYSKY_2A', - 'NRF24_KN' + 'NRF24_KN', ); } @@ -296,20 +296,20 @@ TABS.receiver.initialize = function (callback) { spiRxTypes.push( 'SFHSS', 'SPEKTRUM', - 'FRSKY_X_LBT' + 'FRSKY_X_LBT', ); } if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) { spiRxTypes.push( - 'REDPINE' + 'REDPINE', ); } if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { spiRxTypes.push( 'FRSKY_X_V2', - 'FRSKY_X_LBT_V2' + 'FRSKY_X_LBT_V2', ); } @@ -514,9 +514,9 @@ TABS.receiver.initialize = function (callback) { innerBounds: { minWidth: windowWidth, minHeight: windowHeight, width: windowWidth, height: windowHeight, - maxWidth: windowWidth, maxHeight: windowHeight + maxWidth: windowWidth, maxHeight: windowHeight, }, - alwaysOnTop: true + alwaysOnTop: true, }, function(createdWindow) { // Give the window a callback it can use to send the channels (otherwise it can't see those objects) createdWindow.contentWindow.setRawRx = function(channels) { diff --git a/src/js/tabs/receiver_msp.js b/src/js/tabs/receiver_msp.js index 5d3ff58c..a30087bf 100644 --- a/src/js/tabs/receiver_msp.js +++ b/src/js/tabs/receiver_msp.js @@ -52,7 +52,7 @@ const watchers = { } else { applyNormalTheme(); } - } + }, }; $(document).ready(function () { @@ -182,8 +182,8 @@ $(document).ready(function() { start: initialValue, range: { min: CHANNEL_MIN_VALUE, - max: CHANNEL_MAX_VALUE - } + max: CHANNEL_MAX_VALUE, + }, }).on('slide change set', function(e, value) { value = Math.round(parseFloat(value)); diff --git a/src/js/tabs/sensors.js b/src/js/tabs/sensors.js index 90f2e2a8..32c345b3 100644 --- a/src/js/tabs/sensors.js +++ b/src/js/tabs/sensors.js @@ -265,7 +265,7 @@ TABS.sensors.initialize = function (callback) { initDataArray(1), initDataArray(1), initDataArray(1), - initDataArray(1) + initDataArray(1), ]; let gyroHelpers = initGraphHelpers('#gyro', samples_gyro_i, [-2000, 2000]); @@ -277,13 +277,13 @@ TABS.sensors.initialize = function (callback) { initGraphHelpers('#debug1', samples_debug_i), initGraphHelpers('#debug2', samples_debug_i), initGraphHelpers('#debug3', samples_debug_i), - initGraphHelpers('#debug4', samples_debug_i) + initGraphHelpers('#debug4', samples_debug_i), ]; const raw_data_text_ements = { x: [], y: [], - z: [] + z: [], }; $('.plot_control .x, .plot_control .y, .plot_control .z').each(function () { const el = $(this); @@ -305,13 +305,13 @@ TABS.sensors.initialize = function (callback) { 'mag': parseInt($('.tab-sensors select[name="mag_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), - 'debug': parseInt($('.tab-sensors select[name="debug_refresh_rate"]').val(), 10) + 'debug': parseInt($('.tab-sensors select[name="debug_refresh_rate"]').val(), 10), }; const scales = { 'gyro': parseFloat($('.tab-sensors select[name="gyro_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 diff --git a/src/js/tabs/setup.js b/src/js/tabs/setup.js index d8ef5f04..3d3f21a7 100644 --- a/src/js/tabs/setup.js +++ b/src/js/tabs/setup.js @@ -1,7 +1,7 @@ 'use strict'; TABS.setup = { - yaw_fix: 0.0 + yaw_fix: 0.0, }; TABS.setup.initialize = function (callback) { diff --git a/src/js/tabs/transponder.js b/src/js/tabs/transponder.js index b5208955..694d1dee 100644 --- a/src/js/tabs/transponder.js +++ b/src/js/tabs/transponder.js @@ -2,7 +2,7 @@ TABS.transponder = { - available: false + available: false, }; TABS.transponder.initialize = function(callback, scrollPosition) { @@ -18,10 +18,10 @@ TABS.transponder.initialize = function(callback, scrollPosition) { // CONFIGURATION HERE FOR ADD NEW TRANSPONDER let transponderConfigurations = { 0: { - dataType: dataTypes.NONE // empty + dataType: dataTypes.NONE, // empty }, //NONE 1: { - dataType: dataTypes.TEXT // + dataType: dataTypes.TEXT, // }, //ilap 2: { dataType: dataTypes.LIST, // @@ -35,7 +35,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) { 'ID 7': 'E003F03F00FF03F0C1', 'ID 8': '00FC0FFE071F3E00FE', 'ID 9': 'E083BFF00F9E38C0FF', - } + }, }, //arcitimer 3: { dataType: dataTypes.LIST, // @@ -104,7 +104,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) { '61':'3D', '62':'3E', '63':'3F', - } + }, }, //ERLT }; ///////////////////////////////////////////// @@ -164,7 +164,7 @@ TABS.transponder.initialize = function(callback, scrollPosition) { //build radio buttons if (transponderProviders.length > 1) { transponderTypeSelect.append( - $('