mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 08:45:26 +03:00
1.8 removed
This commit is contained in:
parent
97c622fbb1
commit
521915b5a9
14 changed files with 75 additions and 244 deletions
|
@ -847,7 +847,7 @@
|
||||||
"message": "<strong>Note:</strong> Do <span style=\"color: red\">NOT</span> disable MSP on the first serial port unless you know what you are doing. You may have to reflash and erase your configuration if you do."
|
"message": "<strong>Note:</strong> Do <span style=\"color: red\">NOT</span> disable MSP on the first serial port unless you know what you are doing. You may have to reflash and erase your configuration if you do."
|
||||||
},
|
},
|
||||||
"portsFirmwareUpgradeRequired": {
|
"portsFirmwareUpgradeRequired": {
|
||||||
"message": "Firmware upgrade <span style=\"color: red\">required</span>. Serial port configurations of firmware < 1.8.0 is not supported."
|
"message": "Firmware upgrade <span style=\"color: red\">required</span>."
|
||||||
},
|
},
|
||||||
"portsButtonSave": {
|
"portsButtonSave": {
|
||||||
"message": "Save and Reboot"
|
"message": "Save and Reboot"
|
||||||
|
|
10
js/fc.js
10
js/fc.js
|
@ -580,12 +580,10 @@ var FC = {
|
||||||
{bit: 22, group: 'other', name: 'AIRMODE', haveTip: false, showNameInTip: false}
|
{bit: 22, group: 'other', name: 'AIRMODE', haveTip: false, showNameInTip: false}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
features.push(
|
||||||
features.push(
|
{bit: 30, group: 'other', name: 'FW_LAUNCH', haveTip: false, showNameInTip: false},
|
||||||
{bit: 30, group: 'other', name: 'FW_LAUNCH', haveTip: false, showNameInTip: false},
|
{bit: 2, group: 'other', name: 'TX_PROF_SEL', haveTip: false, showNameInTip: false}
|
||||||
{bit: 2, group: 'other', name: 'TX_PROF_SEL', haveTip: false, showNameInTip: false}
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '2.0.0')) {
|
if (semver.gte(CONFIG.flightControllerVersion, '2.0.0')) {
|
||||||
features.push(
|
features.push(
|
||||||
|
|
|
@ -1229,10 +1229,6 @@ var mspHelper = (function (gui) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSPCodes.MSP_CALIBRATION_DATA:
|
case MSPCodes.MSP_CALIBRATION_DATA:
|
||||||
if (semver.lte(CONFIG.flightControllerVersion, "1.8.0")) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
var callibrations = data.getUint8(0);
|
var callibrations = data.getUint8(0);
|
||||||
CALIBRATION_DATA.acc.Pos0 = (1 & (callibrations >> 0));
|
CALIBRATION_DATA.acc.Pos0 = (1 & (callibrations >> 0));
|
||||||
CALIBRATION_DATA.acc.Pos1 = (1 & (callibrations >> 1));
|
CALIBRATION_DATA.acc.Pos1 = (1 & (callibrations >> 1));
|
||||||
|
@ -2253,10 +2249,6 @@ var mspHelper = (function (gui) {
|
||||||
|
|
||||||
self.sendMotorMixer = function (onCompleteCallback) {
|
self.sendMotorMixer = function (onCompleteCallback) {
|
||||||
|
|
||||||
if (semver.lt(CONFIG.flightControllerVersion, "1.8.1")) {
|
|
||||||
onCompleteCallback();
|
|
||||||
}
|
|
||||||
|
|
||||||
var nextFunction = sendMixer,
|
var nextFunction = sendMixer,
|
||||||
servoIndex = 0;
|
servoIndex = 0;
|
||||||
|
|
||||||
|
@ -2863,19 +2855,11 @@ var mspHelper = (function (gui) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadCalibrationData = function (callback) {
|
self.loadCalibrationData = function (callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.saveCalibrationData = function (callback) {
|
self.saveCalibrationData = function (callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
MSP.send_message(MSPCodes.MSP_SET_CALIBRATION_DATA, mspHelper.crunch(MSPCodes.MSP_SET_CALIBRATION_DATA), false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP_SET_CALIBRATION_DATA, mspHelper.crunch(MSPCodes.MSP_SET_CALIBRATION_DATA), false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadRthAndLandConfig = function (callback) {
|
self.loadRthAndLandConfig = function (callback) {
|
||||||
|
@ -2895,11 +2879,7 @@ var mspHelper = (function (gui) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getMissionInfo = function (callback) {
|
self.getMissionInfo = function (callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self._getSetting = function (name) {
|
self._getSetting = function (name) {
|
||||||
|
@ -3111,11 +3091,7 @@ var mspHelper = (function (gui) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadMotorMixRules = function (callback) {
|
self.loadMotorMixRules = function (callback) {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
MSP.send_message(MSPCodes.MSP2_COMMON_MOTOR_MIXER, false, false, callback);
|
||||||
MSP.send_message(MSPCodes.MSP2_COMMON_MOTOR_MIXER, false, false, callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadMotors = function (callback) {
|
self.loadMotors = function (callback) {
|
||||||
|
@ -3123,29 +3099,21 @@ var mspHelper = (function (gui) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCraftName = function(callback) {
|
self.getCraftName = function(callback) {
|
||||||
if (semver.gt(CONFIG.flightControllerVersion, "1.8.0")) {
|
MSP.send_message(MSPCodes.MSP_NAME, false, false, function(resp) {
|
||||||
MSP.send_message(MSPCodes.MSP_NAME, false, false, function(resp) {
|
var name = resp.data.readString();
|
||||||
var name = resp.data.readString();
|
if (callback) {
|
||||||
if (callback) {
|
callback(name);
|
||||||
callback(name);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
} else if (callback) {
|
|
||||||
callback(null);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setCraftName = function(name, callback) {
|
self.setCraftName = function(name, callback) {
|
||||||
if (semver.gt(CONFIG.flightControllerVersion, "1.8.0")) {
|
var data = [];
|
||||||
var data = [];
|
name = name || "";
|
||||||
name = name || "";
|
for (var ii = 0; ii < name.length; ii++) {
|
||||||
for (var ii = 0; ii < name.length; ii++) {
|
data.push(name.charCodeAt(ii));
|
||||||
data.push(name.charCodeAt(ii));
|
|
||||||
}
|
|
||||||
MSP.send_message(MSPCodes.MSP_SET_NAME, data, false, callback);
|
|
||||||
} else if (callback) {
|
|
||||||
callback();
|
|
||||||
}
|
}
|
||||||
|
MSP.send_message(MSPCodes.MSP_SET_NAME, data, false, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadMixerConfig = function (callback) {
|
self.loadMixerConfig = function (callback) {
|
||||||
|
|
|
@ -53,30 +53,16 @@ helper.periodicStatusUpdater = (function () {
|
||||||
if (ANALOG != undefined) {
|
if (ANALOG != undefined) {
|
||||||
var nbCells;
|
var nbCells;
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
nbCells = ANALOG.cell_count;
|
||||||
nbCells = ANALOG.cell_count;
|
|
||||||
} else {
|
|
||||||
nbCells = Math.floor(ANALOG.voltage / MISC.vbatmaxcellvoltage) + 1;
|
|
||||||
if (ANALOG.voltage == 0)
|
|
||||||
nbCells = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
var min = MISC.vbatmincellvoltage * nbCells;
|
var min = MISC.vbatmincellvoltage * nbCells;
|
||||||
var max = MISC.vbatmaxcellvoltage * nbCells;
|
var max = MISC.vbatmaxcellvoltage * nbCells;
|
||||||
var warn = MISC.vbatwarningcellvoltage * nbCells;
|
var warn = MISC.vbatwarningcellvoltage * nbCells;
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
$(".battery-status").css({
|
||||||
$(".battery-status").css({
|
width: ANALOG.battery_percentage + "%",
|
||||||
width: ANALOG.battery_percentage + "%",
|
display: 'inline-block'
|
||||||
display: 'inline-block'
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$(".battery-status").css({
|
|
||||||
width: ((ANALOG.voltage - min) / (max - min) * 100) + "%",
|
|
||||||
display: 'inline-block'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
$(".linkicon").css({
|
$(".linkicon").css({
|
||||||
'background-image': 'url("../images/icons/cf_icon_link_active.svg")'
|
'background-image': 'url("../images/icons/cf_icon_link_active.svg")'
|
||||||
|
@ -87,7 +73,7 @@ helper.periodicStatusUpdater = (function () {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((semver.gte(CONFIG.flightControllerVersion, '1.8.1')) && (((ANALOG.use_capacity_thresholds) && (ANALOG.battery_remaining_capacity <= (MISC.battery_capacity_warning - MISC.battery_capacity_critical))) || ((!ANALOG.use_capacity_thresholds) && (ANALOG.voltage < warn))) || (ANALOG.voltage < min)) || ((semver.lt(CONFIG.flightControllerVersion, '1.8.1')) && (ANALOG.voltage < warn))) {
|
if (((ANALOG.use_capacity_thresholds && ANALOG.battery_remaining_capacity <= MISC.battery_capacity_warning - MISC.battery_capacity_critical) || (!ANALOG.use_capacity_thresholds && ANALOG.voltage < warn)) || ANALOG.voltage < min) {
|
||||||
$(".battery-status").css('background-color', '#D42133');
|
$(".battery-status").css('background-color', '#D42133');
|
||||||
} else {
|
} else {
|
||||||
$(".battery-status").css('background-color', '#59AA29');
|
$(".battery-status").css('background-color', '#59AA29');
|
||||||
|
@ -124,12 +110,7 @@ helper.periodicStatusUpdater = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_ACTIVEBOXES, false, false);
|
MSP.send_message(MSPCodes.MSP_ACTIVEBOXES, false, false);
|
||||||
|
MSP.send_message(MSPCodes.MSPV2_INAV_ANALOG, false, false);
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
|
||||||
MSP.send_message(MSPCodes.MSPV2_INAV_ANALOG, false, false);
|
|
||||||
} else {
|
|
||||||
MSP.send_message(MSPCodes.MSP_ANALOG, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
privateScope.updateView();
|
privateScope.updateView();
|
||||||
}
|
}
|
||||||
|
|
1
main.js
1
main.js
|
@ -123,7 +123,6 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//set '1.8.0' for test
|
|
||||||
appUpdater.checkRelease(chrome.runtime.getManifest().version);
|
appUpdater.checkRelease(chrome.runtime.getManifest().version);
|
||||||
|
|
||||||
// log library versions in console to make version tracking easier
|
// log library versions in console to make version tracking easier
|
||||||
|
|
|
@ -64,11 +64,7 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
|
|
||||||
// update list of selected functions
|
// update list of selected functions
|
||||||
var functionListOptions = $(functionList).find('option');
|
var functionListOptions = $(functionList).find('option');
|
||||||
var availableFunctionCount = 21;
|
var availableFunctionCount = 32;
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
|
||||||
availableFunctionCount = 32;
|
|
||||||
}
|
|
||||||
|
|
||||||
var functionListOptions = $(functionListOptions).slice(0,availableFunctionCount);
|
var functionListOptions = $(functionListOptions).slice(0,availableFunctionCount);
|
||||||
functionList.empty().append(functionListOptions);
|
functionList.empty().append(functionListOptions);
|
||||||
|
|
|
@ -52,30 +52,20 @@ TABS.calibration.initialize = function (callback) {
|
||||||
GUI.active_tab = 'calibration';
|
GUI.active_tab = 'calibration';
|
||||||
googleAnalytics.sendAppView('Calibration');
|
googleAnalytics.sendAppView('Calibration');
|
||||||
}
|
}
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
loadChainer.setChain([
|
||||||
loadChainer.setChain([
|
mspHelper.loadStatus,
|
||||||
mspHelper.loadStatus,
|
mspHelper.loadSensorConfig,
|
||||||
mspHelper.loadSensorConfig,
|
mspHelper.loadCalibrationData
|
||||||
mspHelper.loadCalibrationData
|
]);
|
||||||
]);
|
loadChainer.setExitPoint(loadHtml);
|
||||||
loadChainer.setExitPoint(loadHtml);
|
loadChainer.execute();
|
||||||
loadChainer.execute();
|
|
||||||
|
|
||||||
saveChainer.setChain([
|
saveChainer.setChain([
|
||||||
mspHelper.saveCalibrationData
|
mspHelper.saveCalibrationData
|
||||||
]);
|
]);
|
||||||
saveChainer.setExitPoint(reboot);
|
saveChainer.setExitPoint(reboot);
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_IDENT, false, false, loadHtml);
|
MSP.send_message(MSPCodes.MSP_IDENT, false, false, loadHtml);
|
||||||
} else {
|
|
||||||
loadChainer.setChain([
|
|
||||||
mspHelper.loadStatus
|
|
||||||
]);
|
|
||||||
loadChainer.setExitPoint(loadHtml);
|
|
||||||
loadChainer.execute();
|
|
||||||
|
|
||||||
saveChainer.setExitPoint(reboot);
|
|
||||||
}
|
|
||||||
|
|
||||||
function reboot() {
|
function reboot() {
|
||||||
//noinspection JSUnresolvedVariable
|
//noinspection JSUnresolvedVariable
|
||||||
|
@ -132,32 +122,6 @@ TABS.calibration.initialize = function (callback) {
|
||||||
updateSensorData();
|
updateSensorData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//For 1.8.0
|
|
||||||
function calibrate() {
|
|
||||||
var self = $(this);
|
|
||||||
|
|
||||||
if (!self.hasClass('disabled')) {
|
|
||||||
self.addClass('disabled');
|
|
||||||
MSP.send_message(MSPCodes.MSP_ACC_CALIBRATION, false, false, function () {
|
|
||||||
GUI.log(chrome.i18n.getMessage('initialSetupAccelCalibStarted'));
|
|
||||||
});
|
|
||||||
|
|
||||||
helper.timeout.add('button_reset', function () {
|
|
||||||
GUI.log(chrome.i18n.getMessage('initialSetupAccelCalibEnded'));
|
|
||||||
|
|
||||||
self.removeClass('disabled');
|
|
||||||
|
|
||||||
if (!bit_check(CONFIG.armingFlags & 0xff00, 13)) {
|
|
||||||
for (var i = 0; i < 6; i++) {
|
|
||||||
CALIBRATION_DATA.acc['Pos' + i] = 1;
|
|
||||||
}
|
|
||||||
updateCalibrationSteps();
|
|
||||||
}
|
|
||||||
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function calibrateNew() {
|
function calibrateNew() {
|
||||||
var newStep = null,
|
var newStep = null,
|
||||||
$button = $(this);
|
$button = $(this);
|
||||||
|
@ -215,17 +179,6 @@ TABS.calibration.initialize = function (callback) {
|
||||||
saveChainer.execute();
|
saveChainer.execute();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.lte(CONFIG.flightControllerVersion, "1.8.0")) {
|
|
||||||
$('#accPosAll, #mag-calibrated-data').hide();
|
|
||||||
|
|
||||||
var accIsCalibrate = +(!bit_check(CONFIG.armingFlags & 0xff00, 13));
|
|
||||||
for (var i = 0; i < 6; i++) {
|
|
||||||
CALIBRATION_DATA.acc['Pos' + i] = accIsCalibrate;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCalibrationSteps();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SENSOR_CONFIG.magnetometer === 0) {
|
if (SENSOR_CONFIG.magnetometer === 0) {
|
||||||
//Comment for test
|
//Comment for test
|
||||||
$('#mag_btn, #mag-calibrated-data').css('pointer-events', 'none').css('opacity', '0.4');
|
$('#mag_btn, #mag-calibrated-data').css('pointer-events', 'none').css('opacity', '0.4');
|
||||||
|
@ -258,9 +211,7 @@ TABS.calibration.initialize = function (callback) {
|
||||||
|
|
||||||
modalProcessing.close();
|
modalProcessing.close();
|
||||||
GUI.log(chrome.i18n.getMessage('initialSetupMagCalibEnded'));
|
GUI.log(chrome.i18n.getMessage('initialSetupMagCalibEnded'));
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, updateSensorData);
|
||||||
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, updateSensorData);
|
|
||||||
}
|
|
||||||
helper.interval.remove('compass_calibration_interval');
|
helper.interval.remove('compass_calibration_interval');
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -277,13 +228,10 @@ TABS.calibration.initialize = function (callback) {
|
||||||
|
|
||||||
// translate to user-selected language
|
// translate to user-selected language
|
||||||
localize();
|
localize();
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
|
||||||
$('#calibrate-start-button').on('click', calibrateNew);
|
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, updateSensorData);
|
$('#calibrate-start-button').on('click', calibrateNew);
|
||||||
} else {
|
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, updateSensorData);
|
||||||
$('#calibrate-start-button').on('click', calibrate);
|
|
||||||
}
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -495,7 +495,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="config-section gui_box grey requires-v1_8_1">
|
<div class="config-section gui_box grey">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title" data-i18n="configurationBatteryCapacity"></div>
|
<div class="spacer_box_title" data-i18n="configurationBatteryCapacity"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -44,12 +44,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
loadCraftName
|
loadCraftName
|
||||||
];
|
];
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
loadChain.push(mspHelper.loadMiscV2);
|
||||||
loadChain.push(mspHelper.loadMiscV2);
|
|
||||||
} else {
|
|
||||||
loadChain.push(mspHelper.loadMisc);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadChainer.setChain(loadChain);
|
loadChainer.setChain(loadChain);
|
||||||
loadChainer.setExitPoint(load_html);
|
loadChainer.setExitPoint(load_html);
|
||||||
loadChainer.execute();
|
loadChainer.execute();
|
||||||
|
@ -71,12 +66,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
saveCraftName,
|
saveCraftName,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
saveChain.push(mspHelper.saveMiscV2);
|
||||||
saveChain.push(mspHelper.saveMiscV2);
|
|
||||||
} else {
|
|
||||||
saveChain.push(mspHelper.saveMisc);
|
|
||||||
}
|
|
||||||
|
|
||||||
saveChain.push(mspHelper.saveToEeprom);
|
saveChain.push(mspHelper.saveToEeprom);
|
||||||
|
|
||||||
saveChainer.setChain(saveChain);
|
saveChainer.setChain(saveChain);
|
||||||
|
@ -417,14 +407,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
$('#maxthrottle').val(MISC.maxthrottle);
|
$('#maxthrottle').val(MISC.maxthrottle);
|
||||||
$('#mincommand').val(MISC.mincommand);
|
$('#mincommand').val(MISC.mincommand);
|
||||||
|
|
||||||
// Battery thresholds resolution is 100mV and voltage scale max is 255 before 1.8.1
|
|
||||||
if (semver.lt(CONFIG.flightControllerVersion, '1.8.1')) {
|
|
||||||
$('#mincellvoltage').attr('step', '0.1');
|
|
||||||
$('#maxcellvoltage').attr('step', '0.1');
|
|
||||||
$('#warningcellvoltage').attr('step', '0.1');
|
|
||||||
$('#voltagescale').attr('max', '255');
|
|
||||||
}
|
|
||||||
|
|
||||||
// fill battery voltage
|
// fill battery voltage
|
||||||
$('#voltagesource').val(MISC.voltage_source);
|
$('#voltagesource').val(MISC.voltage_source);
|
||||||
$('#cells').val(MISC.battery_cells);
|
$('#cells').val(MISC.battery_cells);
|
||||||
|
@ -736,12 +718,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
SENSOR_CONFIG.opflow = $sensorOpflow.val();
|
SENSOR_CONFIG.opflow = $sensorOpflow.val();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.8.1")) {
|
|
||||||
$(".requires-v1_8_1").show();
|
|
||||||
} else {
|
|
||||||
$(".requires-v1_8_1").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
|
||||||
$(".requires-v2_0_0").show();
|
$(".requires-v2_0_0").show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -903,11 +879,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
});
|
});
|
||||||
|
|
||||||
helper.interval.add('config_load_analog', function () {
|
helper.interval.add('config_load_analog', function () {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
$('#batteryvoltage').val([ANALOG.voltage.toFixed(2)]);
|
||||||
$('#batteryvoltage').val([ANALOG.voltage.toFixed(2)]);
|
|
||||||
} else {
|
|
||||||
$('#batteryvoltage').val([ANALOG.voltage.toFixed(1)]);
|
|
||||||
}
|
|
||||||
$('#batterycurrent').val([ANALOG.amperage.toFixed(2)]);
|
$('#batterycurrent').val([ANALOG.amperage.toFixed(2)]);
|
||||||
}, 100, true); // 10 fps
|
}, 100, true); // 10 fps
|
||||||
|
|
||||||
|
|
|
@ -574,7 +574,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'MAIN_BATT_REMAINING_PERCENTAGE',
|
name: 'MAIN_BATT_REMAINING_PERCENTAGE',
|
||||||
id: 38,
|
id: 38,
|
||||||
min_version: '1.8.1',
|
|
||||||
preview: '100%'
|
preview: '100%'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -912,7 +911,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'WH_DRAWN',
|
name: 'WH_DRAWN',
|
||||||
id: 36,
|
id: 36,
|
||||||
min_version: '1.8.1',
|
|
||||||
preview: FONT.symbol(SYM.WH) + FONT.embed_dot('1.25')
|
preview: FONT.symbol(SYM.WH) + FONT.embed_dot('1.25')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -923,7 +921,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'MAIN_BATT_REMAINING_CAPACITY',
|
name: 'MAIN_BATT_REMAINING_CAPACITY',
|
||||||
id: 37,
|
id: 37,
|
||||||
min_version: '1.8.1',
|
|
||||||
preview: FONT.symbol(SYM.MAH) + '690 ' // 4 chars
|
preview: FONT.symbol(SYM.MAH) + '690 ' // 4 chars
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -934,7 +931,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'EFFICIENCY_WH',
|
name: 'EFFICIENCY_WH',
|
||||||
id: 39,
|
id: 39,
|
||||||
min_version: '1.8.1',
|
|
||||||
preview: FONT.embed_dot('1.23') + FONT.symbol(SYM.WH_KM_0) + FONT.symbol(SYM.WH_KM_1)
|
preview: FONT.embed_dot('1.23') + FONT.symbol(SYM.WH_KM_0) + FONT.symbol(SYM.WH_KM_1)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -16,12 +16,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
mspHelper.loadPidAdvanced,
|
mspHelper.loadPidAdvanced,
|
||||||
mspHelper.loadFilterConfig
|
mspHelper.loadFilterConfig
|
||||||
];
|
];
|
||||||
|
loadChain.push(mspHelper.loadRateProfileData);
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
|
||||||
loadChain.push(mspHelper.loadRateProfileData);
|
|
||||||
} else {
|
|
||||||
loadChain.push(mspHelper.loadRcTuningData);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadChainer.setChain(loadChain);
|
loadChainer.setChain(loadChain);
|
||||||
loadChainer.setExitPoint(load_html);
|
loadChainer.setExitPoint(load_html);
|
||||||
|
@ -233,11 +228,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_rc_tuning_changes() {
|
function send_rc_tuning_changes() {
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
MSP.send_message(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE, mspHelper.crunch(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE), false, saveINAVPidConfig);
|
||||||
MSP.send_message(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE, mspHelper.crunch(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE), false, saveINAVPidConfig);
|
|
||||||
} else {
|
|
||||||
MSP.send_message(MSPCodes.MSP_SET_RC_TUNING, mspHelper.crunch(MSPCodes.MSP_SET_RC_TUNING), false, saveINAVPidConfig);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveINAVPidConfig() {
|
function saveINAVPidConfig() {
|
||||||
|
|
|
@ -24,12 +24,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
mspHelper.loadRcDeadband
|
mspHelper.loadRcDeadband
|
||||||
];
|
];
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
loadChain.push(mspHelper.loadRateProfileData);
|
||||||
loadChain.push(mspHelper.loadRateProfileData);
|
|
||||||
} else {
|
|
||||||
loadChain.push(mspHelper.loadRcTuningData);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadChainer.setChain(loadChain);
|
loadChainer.setChain(loadChain);
|
||||||
loadChainer.setExitPoint(load_html);
|
loadChainer.setExitPoint(load_html);
|
||||||
loadChainer.execute();
|
loadChainer.execute();
|
||||||
|
@ -328,11 +323,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
MSP.send_message(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE, mspHelper.crunch(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE), false, save_rc_map);
|
||||||
MSP.send_message(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE, mspHelper.crunch(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE), false, save_rc_map);
|
|
||||||
} else {
|
|
||||||
MSP.send_message(MSPCodes.MSP_SET_RC_TUNING, mspHelper.crunch(MSPCodes.MSP_SET_RC_TUNING), false, save_rc_map);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a.sticks").click(function () {
|
$("a.sticks").click(function () {
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<div class="spacer_box">
|
<div class="spacer_box">
|
||||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cf_table">
|
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cf_table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="requires-v1_8_1">
|
<tr>
|
||||||
<td data-i18n="initialSetupBatteryDetectedCells"></td>
|
<td data-i18n="initialSetupBatteryDetectedCells"></td>
|
||||||
<td class="bat-cells">0</td>
|
<td class="bat-cells">0</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -100,19 +100,19 @@
|
||||||
<td data-i18n="initialSetupBatteryVoltage"></td>
|
<td data-i18n="initialSetupBatteryVoltage"></td>
|
||||||
<td class="bat-voltage">0 V</td>
|
<td class="bat-voltage">0 V</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v1_8_1">
|
<tr>
|
||||||
<td data-i18n="initialSetupBatteryPercentage"></td>
|
<td data-i18n="initialSetupBatteryPercentage"></td>
|
||||||
<td class="bat-percent">0 %</td>
|
<td class="bat-percent">0 %</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v1_8_1">
|
<tr>
|
||||||
<td data-i18n="initialSetupBatteryRemainingCapacity"></td>
|
<td data-i18n="initialSetupBatteryRemainingCapacity"></td>
|
||||||
<td class="bat-remain-cap">NA</td>
|
<td class="bat-remain-cap">NA</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v1_8_1">
|
<tr>
|
||||||
<td data-i18n="initialSetupBatteryFull"></td>
|
<td data-i18n="initialSetupBatteryFull"></td>
|
||||||
<td class="bat-full">0</td>
|
<td class="bat-full">0</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v1_8_1">
|
<tr>
|
||||||
<td data-i18n="initialSetupBatteryThresholds"></td>
|
<td data-i18n="initialSetupBatteryThresholds"></td>
|
||||||
<td class="bat-thresh">0</td>
|
<td class="bat-thresh">0</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<td data-i18n="initialSetupDrawn"></td>
|
<td data-i18n="initialSetupDrawn"></td>
|
||||||
<td class="bat-mah-drawn">0 mAh</td>
|
<td class="bat-mah-drawn">0 mAh</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="requires-v1_8_1">
|
<tr>
|
||||||
<td data-i18n="initialSetup_Wh_drawn"></td>
|
<td data-i18n="initialSetup_Wh_drawn"></td>
|
||||||
<td class="bat-mwh-drawn">0 Wh</td>
|
<td class="bat-mwh-drawn">0 Wh</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -21,12 +21,7 @@ TABS.setup.initialize = function (callback) {
|
||||||
mspHelper.loadMixerConfig
|
mspHelper.loadMixerConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, '1.8.1')) {
|
loadChain.push(mspHelper.loadMiscV2);
|
||||||
loadChain.push(mspHelper.loadMiscV2);
|
|
||||||
} else {
|
|
||||||
loadChain.push(mspHelper.loadMisc);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadChainer.setChain(loadChain);
|
loadChainer.setChain(loadChain);
|
||||||
loadChainer.setExitPoint(load_html);
|
loadChainer.setExitPoint(load_html);
|
||||||
loadChainer.execute();
|
loadChainer.execute();
|
||||||
|
@ -150,26 +145,22 @@ TABS.setup.initialize = function (callback) {
|
||||||
helper.mspBalancedInterval.add('setup_data_pull_fast', 40, 1, get_fast_data);
|
helper.mspBalancedInterval.add('setup_data_pull_fast', 40, 1, get_fast_data);
|
||||||
helper.mspBalancedInterval.add('setup_data_pull_slow', 250, 1, get_slow_data);
|
helper.mspBalancedInterval.add('setup_data_pull_slow', 250, 1, get_slow_data);
|
||||||
|
|
||||||
if (semver.lt(CONFIG.flightControllerVersion, '1.8.1')) {
|
|
||||||
$('.requires-v1_8_1').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
helper.interval.add('gui_analog_update', function () {
|
helper.interval.add('gui_analog_update', function () {
|
||||||
bat_cells_e.text(chrome.i18n.getMessage('initialSetupBatteryDetectedCellsValue', [ANALOG.cell_count]));
|
bat_cells_e.text(chrome.i18n.getMessage('initialSetupBatteryDetectedCellsValue', [ANALOG.cell_count]));
|
||||||
bat_voltage_e.text(chrome.i18n.getMessage('initialSetupBatteryVoltageValue', [ANALOG.voltage]));
|
bat_voltage_e.text(chrome.i18n.getMessage('initialSetupBatteryVoltageValue', [ANALOG.voltage]));
|
||||||
remaining_capacity_wh_decimals = ANALOG.battery_remaining_capacity.toString().length < 5 ? 3 : (7 - ANALOG.battery_remaining_capacity.toString().length);
|
remaining_capacity_wh_decimals = ANALOG.battery_remaining_capacity.toString().length < 5 ? 3 : (7 - ANALOG.battery_remaining_capacity.toString().length);
|
||||||
remaining_capacity_value = MISC.battery_capacity_unit == 'mAh' ? ANALOG.battery_remaining_capacity : (ANALOG.battery_remaining_capacity / 1000).toFixed(remaining_capacity_wh_decimals < 0 ? 0 : remaining_capacity_wh_decimals);
|
remaining_capacity_value = MISC.battery_capacity_unit == 'mAh' ? ANALOG.battery_remaining_capacity : (ANALOG.battery_remaining_capacity / 1000).toFixed(remaining_capacity_wh_decimals < 0 ? 0 : remaining_capacity_wh_decimals);
|
||||||
remaining_capacity_unit = MISC.battery_capacity_unit == 'mAh' ? 'mAh' : 'Wh';
|
remaining_capacity_unit = MISC.battery_capacity_unit == 'mAh' ? 'mAh' : 'Wh';
|
||||||
bat_remaining_e.text(chrome.i18n.getMessage('initialSetupBatteryRemainingCapacityValue', ((MISC.battery_capacity > 0) && ANALOG.battery_full_when_plugged_in) ? [remaining_capacity_value, remaining_capacity_unit] : ['NA', '']));
|
bat_remaining_e.text(chrome.i18n.getMessage('initialSetupBatteryRemainingCapacityValue', ((MISC.battery_capacity > 0) && ANALOG.battery_full_when_plugged_in) ? [remaining_capacity_value, remaining_capacity_unit] : ['NA', '']));
|
||||||
bat_percent_e.text(chrome.i18n.getMessage('initialSetupBatteryPercentageValue', [ANALOG.battery_percentage]));
|
bat_percent_e.text(chrome.i18n.getMessage('initialSetupBatteryPercentageValue', [ANALOG.battery_percentage]));
|
||||||
bat_full_e.text(chrome.i18n.getMessage('initialSetupBatteryFullValue', [ANALOG.battery_full_when_plugged_in]));
|
bat_full_e.text(chrome.i18n.getMessage('initialSetupBatteryFullValue', [ANALOG.battery_full_when_plugged_in]));
|
||||||
bat_thresh_e.text(chrome.i18n.getMessage('initialSetupBatteryThresholdsValue', [ANALOG.use_capacity_thresholds]));
|
bat_thresh_e.text(chrome.i18n.getMessage('initialSetupBatteryThresholdsValue', [ANALOG.use_capacity_thresholds]));
|
||||||
bat_mah_drawn_e.text(chrome.i18n.getMessage('initialSetupBatteryMahValue', [ANALOG.mAhdrawn]));
|
bat_mah_drawn_e.text(chrome.i18n.getMessage('initialSetupBatteryMahValue', [ANALOG.mAhdrawn]));
|
||||||
capacity_drawn_decimals = ANALOG.mWhdrawn.toString().length < 5 ? 3 : (7 - ANALOG.mWhdrawn.toString().length);
|
capacity_drawn_decimals = ANALOG.mWhdrawn.toString().length < 5 ? 3 : (7 - ANALOG.mWhdrawn.toString().length);
|
||||||
bat_wh_drawn_e.text(chrome.i18n.getMessage('initialSetup_Wh_drawnValue', [(ANALOG.mWhdrawn / 1000).toFixed(capacity_drawn_decimals < 0 ? 0 : capacity_drawn_decimals)]));
|
bat_wh_drawn_e.text(chrome.i18n.getMessage('initialSetup_Wh_drawnValue', [(ANALOG.mWhdrawn / 1000).toFixed(capacity_drawn_decimals < 0 ? 0 : capacity_drawn_decimals)]));
|
||||||
bat_current_draw_e.text(chrome.i18n.getMessage('initialSetupCurrentDrawValue', [ANALOG.amperage.toFixed(2)]));
|
bat_current_draw_e.text(chrome.i18n.getMessage('initialSetupCurrentDrawValue', [ANALOG.amperage.toFixed(2)]));
|
||||||
bat_power_draw_e.text(chrome.i18n.getMessage('initialSetupPowerDrawValue', [ANALOG.power.toFixed(2)]));
|
bat_power_draw_e.text(chrome.i18n.getMessage('initialSetupPowerDrawValue', [ANALOG.power.toFixed(2)]));
|
||||||
rssi_e.text(chrome.i18n.getMessage('initialSetupRSSIValue', [((ANALOG.rssi / 1023) * 100).toFixed(0)]));
|
rssi_e.text(chrome.i18n.getMessage('initialSetupRSSIValue', [((ANALOG.rssi / 1023) * 100).toFixed(0)]));
|
||||||
}, 100, true);
|
}, 100, true);
|
||||||
|
|
||||||
function updateArminFailure() {
|
function updateArminFailure() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue