Commit cb1ff697 authored by Pawel Spychalski (DzikuVx)'s avatar Pawel Spychalski (DzikuVx)
Browse files

Cleanup INAV 2.0.0

parent 0016746d
......@@ -62,9 +62,6 @@ var CONFIG,
var FC = {
MAX_SERVO_RATE: 125,
MIN_SERVO_RATE: 0,
isNewMixer: function () {
return !!(typeof CONFIG != "undefined" && semver.gte(CONFIG.flightControllerVersion, "2.0.0"));
},
isRpyFfComponentUsed: function () {
return MIXER_CONFIG.platformType == PLATFORM_AIRPLANE;
},
......@@ -560,49 +557,17 @@ var FC = {
{bit: 15, group: 'other', name: 'RSSI_ADC', haveTip: true, showNameInTip: true},
{bit: 16, group: 'other', name: 'LED_STRIP', showNameInTip: true},
{bit: 17, group: 'other', name: 'DASHBOARD', showNameInTip: true},
{bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true, showNameInTip: true}
];
if (semver.lt(CONFIG.flightControllerVersion, "2.0.0")) {
features.push(
{bit: 20, group: 'other', name: 'CHANNEL_FORWARDING', showNameInTip: true},
{bit: 5, group: 'other', name: 'SERVO_TILT', showNameInTip: true}
);
}
features.push(
{bit: 28, group: 'esc-priority', name: 'PWM_OUTPUT_ENABLE', haveTip: true}
);
if (semver.gte(CONFIG.apiVersion, "1.21.0")) {
features.push(
{bit: 26, group: 'other', name: 'SOFTSPI'}
);
}
features.push(
{bit: 27, group: 'other', name: 'PWM_SERVO_DRIVER', haveTip: true, showNameInTip: true}
);
features.push(
{bit: 29, group: 'other', name: 'OSD', haveTip: false, showNameInTip: false}
);
features.push(
{bit: 22, group: 'other', name: 'AIRMODE', haveTip: false, showNameInTip: false}
);
features.push(
{bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true, showNameInTip: true},
{bit: 28, group: 'esc-priority', name: 'PWM_OUTPUT_ENABLE', haveTip: true},
{bit: 26, group: 'other', name: 'SOFTSPI'},
{bit: 27, group: 'other', name: 'PWM_SERVO_DRIVER', haveTip: true, showNameInTip: true},
{bit: 29, group: 'other', name: 'OSD', haveTip: false, showNameInTip: false},
{bit: 22, group: 'other', name: 'AIRMODE', 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}
);
if (semver.gte(CONFIG.flightControllerVersion, '2.0.0')) {
features.push(
{bit: 0, group: 'other', name: 'THR_VBAT_COMP', haveTip: true, showNameInTip: true},
{bit: 3, group: 'other', name: 'BAT_PROFILE_AUTOSWITCH', haveTip: true, showNameInTip: true}
);
}
{bit: 2, group: 'other', name: 'TX_PROF_SEL', haveTip: false, showNameInTip: false},
{bit: 0, group: 'other', name: 'THR_VBAT_COMP', haveTip: true, showNameInTip: true},
{bit: 3, group: 'other', name: 'BAT_PROFILE_AUTOSWITCH', haveTip: true, showNameInTip: true}
];
return features.reverse();
},
......@@ -802,13 +767,10 @@ var FC = {
'XBUS_MODE_B_RJ01',
'IBUS',
'JETI EXBUS',
'TBS Crossfire'
'TBS Crossfire',
'FPort'
];
if (semver.gte(CONFIG.flightControllerVersion, "1.9.1")) {
data.push('FPort');
}
return data;
},
getSPIProtocolTypes: function () {
......@@ -975,13 +937,9 @@ var FC = {
getAccelerometerNames: function () {
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "ICM20689", "FAKE"];
}
else if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
} else {
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "BMI160", "FAKE"];
}
else {
return [ "NONE", "AUTO", "ADXL345", "MPU6050", "MMA845x", "BMA280", "LSM303DLHC", "MPU6000", "MPU6500", "MPU9250", "FAKE"];
}
},
getMagnetometerNames: function () {
return ["NONE", "AUTO", "HMC5883", "AK8975", "GPSMAG", "MAG3110", "AK8963", "IST8310", "QMC5883", "MPU9250", "IST8308", "LIS3MDL", "FAKE"];
......@@ -989,21 +947,12 @@ var FC = {
getBarometerNames: function () {
if (semver.gte(CONFIG.flightControllerVersion, "2.3.0")) {
return ["NONE", "AUTO", "BMP085", "MS5611", "BMP280", "MS5607", "LPS25H", "SPL06", "FAKE"];
} else if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
return ["NONE", "AUTO", "BMP085", "MS5611", "BMP280", "MS5607", "LPS25H", "FAKE"];
} else if (semver.gte(CONFIG.flightControllerVersion, "1.6.2")) {
return ["NONE", "AUTO", "BMP085", "MS5611", "BMP280", "MS5607", "FAKE"];
} else {
return ["NONE", "AUTO", "BMP085", "MS5611", "BMP280", "FAKE"];
return ["NONE", "AUTO", "BMP085", "MS5611", "BMP280", "MS5607", "LPS25H", "FAKE"];
}
},
getPitotNames: function () {
if (semver.gte(CONFIG.flightControllerVersion, "1.6.3")) {
return ["NONE", "AUTO", "MS4525", "ADC", "VIRTUAL", "FAKE"];
}
else {
return ["NONE", "AUTO", "MS4525", "FAKE"];
}
return ["NONE", "AUTO", "MS4525", "ADC", "VIRTUAL", "FAKE"];
},
getRangefinderNames: function () {
let data = [ "NONE", "HCSR04", "SRF10", "INAV_I2C", "VL53L0X", "MSP", "UIB"];
......@@ -1084,10 +1033,7 @@ var FC = {
}
},
getRcMapLetters: function () {
if (semver.gte(CONFIG.flightControllerVersion, '1.9.1'))
return ['A', 'E', 'R', 'T'];
else
return ['A', 'E', 'R', 'T', '5', '6', '7', '8'];
return ['A', 'E', 'R', 'T'];
},
isRcMapValid: function (val) {
var strBuffer = val.split(''),
......
......@@ -231,49 +231,26 @@ var mspHelper = (function (gui) {
ANALOG.amperage = data.getInt16(5, true) / 100; // A
break;
case MSPCodes.MSPV2_INAV_ANALOG:
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
var tmp = data.getUint8(offset++);
ANALOG.battery_full_when_plugged_in = (tmp & 1 ? true : false);
ANALOG.use_capacity_thresholds = ((tmp & 2) >> 1 ? true : false);
ANALOG.battery_state = (tmp & 12) >> 2;
ANALOG.cell_count = (tmp & 0xF0) >> 4;
ANALOG.voltage = data.getUint16(offset, true) / 100.0;
offset += 2;
ANALOG.amperage = data.getInt16(offset, true) / 100; // A
offset += 2;
ANALOG.power = data.getInt32(offset, true) / 100.0;
offset += 4;
ANALOG.mAhdrawn = data.getInt32(offset, true);
offset += 4;
ANALOG.mWhdrawn = data.getInt32(offset, true);
offset += 4;
ANALOG.battery_remaining_capacity = data.getUint32(offset, true);
offset += 4;
ANALOG.battery_percentage = data.getUint8(offset++);
ANALOG.rssi = data.getUint16(offset, true); // 0-1023
offset += 2;
} else {
ANALOG.voltage = data.getUint16(offset, true) / 100.0;
offset += 2;
ANALOG.cell_count = data.getUint8(offset++);
ANALOG.battery_percentage = data.getUint8(offset++);
ANALOG.power = data.getUint16(offset, true);
offset += 2;
ANALOG.mAhdrawn = data.getUint16(offset, true);
offset += 2;
ANALOG.mWhdrawn = data.getUint16(offset, true);
offset += 2;
ANALOG.rssi = data.getUint16(offset, true); // 0-1023
offset += 2;
ANALOG.amperage = data.getInt16(offset, true) / 100; // A
offset += 2;
var battery_flags = data.getUint8(offset++);
ANALOG.battery_full_when_plugged_in = (battery_flags & 1 ? true : false);
ANALOG.use_capacity_thresholds = ((battery_flags & 2) >> 1 ? true : false);
ANALOG.battery_state = (battery_flags & 12) >> 2;
ANALOG.battery_remaining_capacity = data.getUint32(offset, true);
offset += 4;
}
let tmp = data.getUint8(offset++);
ANALOG.battery_full_when_plugged_in = (tmp & 1 ? true : false);
ANALOG.use_capacity_thresholds = ((tmp & 2) >> 1 ? true : false);
ANALOG.battery_state = (tmp & 12) >> 2;
ANALOG.cell_count = (tmp & 0xF0) >> 4;
ANALOG.voltage = data.getUint16(offset, true) / 100.0;
offset += 2;
ANALOG.amperage = data.getInt16(offset, true) / 100; // A
offset += 2;
ANALOG.power = data.getInt32(offset, true) / 100.0;
offset += 4;
ANALOG.mAhdrawn = data.getInt32(offset, true);
offset += 4;
ANALOG.mWhdrawn = data.getInt32(offset, true);
offset += 4;
ANALOG.battery_remaining_capacity = data.getUint32(offset, true);
offset += 4;
ANALOG.battery_percentage = data.getUint8(offset++);
ANALOG.rssi = data.getUint16(offset, true); // 0-1023
offset += 2;
//noinspection JSValidateTypes
dataHandler.analog_last_received_timestamp = Date.now();
break;
......@@ -385,12 +362,10 @@ var mspHelper = (function (gui) {
offset += 2;
MISC.vbatscale = data.getUint16(offset, true);
offset += 2;
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
MISC.voltage_source = data.getUint8(offset++);
MISC.battery_cells = data.getUint8(offset++);
MISC.vbatdetectcellvoltage = data.getUint16(offset, true) / 100;
offset += 2;
}
MISC.voltage_source = data.getUint8(offset++);
MISC.battery_cells = data.getUint8(offset++);
MISC.vbatdetectcellvoltage = data.getUint16(offset, true) / 100;
offset += 2;
MISC.vbatmincellvoltage = data.getUint16(offset, true) / 100;
offset += 2;
MISC.vbatmaxcellvoltage = data.getUint16(offset, true) / 100;
......@@ -411,12 +386,10 @@ var mspHelper = (function (gui) {
case MSPCodes.MSPV2_INAV_BATTERY_CONFIG:
BATTERY_CONFIG.vbatscale = data.getUint16(offset, true);
offset += 2;
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
BATTERY_CONFIG.voltage_source = data.getUint8(offset++);
BATTERY_CONFIG.battery_cells = data.getUint8(offset++);
BATTERY_CONFIG.vbatdetectcellvoltage = data.getUint16(offset, true) / 100;
offset += 2;
}
BATTERY_CONFIG.voltage_source = data.getUint8(offset++);
BATTERY_CONFIG.battery_cells = data.getUint8(offset++);
BATTERY_CONFIG.vbatdetectcellvoltage = data.getUint16(offset, true) / 100;
offset += 2;
BATTERY_CONFIG.vbatmincellvoltage = data.getUint16(offset, true) / 100;
offset += 2;
BATTERY_CONFIG.vbatmaxcellvoltage = data.getUint16(offset, true) / 100;
......@@ -634,9 +607,7 @@ var mspHelper = (function (gui) {
SENSOR_ALIGNMENT.align_gyro = data.getUint8(offset++);
SENSOR_ALIGNMENT.align_acc = data.getUint8(offset++);
SENSOR_ALIGNMENT.align_mag = data.getUint8(offset++);
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
SENSOR_ALIGNMENT.align_opflow = data.getUint8(offset++);
}
SENSOR_ALIGNMENT.align_opflow = data.getUint8(offset++);
break;
case MSPCodes.MSP_SET_RAW_RC:
break;
......@@ -1224,11 +1195,9 @@ var mspHelper = (function (gui) {
FILTER_CONFIG.gyroNotchHz2 = data.getUint16(13, true);
FILTER_CONFIG.gyroNotchCutoff2 = data.getUint16(15, true);
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
FILTER_CONFIG.accNotchHz = data.getUint16(17, true);
FILTER_CONFIG.accNotchCutoff = data.getUint16(19, true);
FILTER_CONFIG.gyroStage2LowpassHz = data.getUint16(21, true);
}
FILTER_CONFIG.accNotchHz = data.getUint16(17, true);
FILTER_CONFIG.accNotchCutoff = data.getUint16(19, true);
FILTER_CONFIG.gyroStage2LowpassHz = data.getUint16(21, true);
break;
......@@ -1693,12 +1662,10 @@ var mspHelper = (function (gui) {
buffer.push(highByte(Math.round(MISC.mag_declination * 10)));
buffer.push(lowByte(MISC.vbatscale));
buffer.push(highByte(MISC.vbatscale));
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
buffer.push(MISC.voltage_source);
buffer.push(MISC.battery_cells);
buffer.push(lowByte(Math.round(MISC.vbatdetectcellvoltage * 100)));
buffer.push(highByte(Math.round(MISC.vbatdetectcellvoltage * 100)));
}
buffer.push(MISC.voltage_source);
buffer.push(MISC.battery_cells);
buffer.push(lowByte(Math.round(MISC.vbatdetectcellvoltage * 100)));
buffer.push(highByte(Math.round(MISC.vbatdetectcellvoltage * 100)));
buffer.push(lowByte(Math.round(MISC.vbatmincellvoltage * 100)));
buffer.push(highByte(Math.round(MISC.vbatmincellvoltage * 100)));
buffer.push(lowByte(Math.round(MISC.vbatmaxcellvoltage * 100)));
......@@ -1716,12 +1683,10 @@ var mspHelper = (function (gui) {
case MSPCodes.MSPV2_INAV_SET_BATTERY_CONFIG:
buffer.push(lowByte(BATTERY_CONFIG.vbatscale));
buffer.push(highByte(BATTERY_CONFIG.vbatscale));
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
buffer.push(BATTERY_CONFIG.voltage_source);
buffer.push(BATTERY_CONFIG.battery_cells);
buffer.push(lowByte(Math.round(BATTERY_CONFIG.vbatdetectcellvoltage * 100)));
buffer.push(highByte(Math.round(BATTERY_CONFIG.vbatdetectcellvoltage * 100)));
}
buffer.push(BATTERY_CONFIG.voltage_source);
buffer.push(BATTERY_CONFIG.battery_cells);
buffer.push(lowByte(Math.round(BATTERY_CONFIG.vbatdetectcellvoltage * 100)));
buffer.push(highByte(Math.round(BATTERY_CONFIG.vbatdetectcellvoltage * 100)));
buffer.push(lowByte(Math.round(BATTERY_CONFIG.vbatmincellvoltage * 100)));
buffer.push(highByte(Math.round(BATTERY_CONFIG.vbatmincellvoltage * 100)));
buffer.push(lowByte(Math.round(BATTERY_CONFIG.vbatmaxcellvoltage * 100)));
......@@ -1874,9 +1839,7 @@ var mspHelper = (function (gui) {
buffer.push(SENSOR_ALIGNMENT.align_gyro);
buffer.push(SENSOR_ALIGNMENT.align_acc);
buffer.push(SENSOR_ALIGNMENT.align_mag);
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
buffer.push(SENSOR_ALIGNMENT.align_opflow);
}
buffer.push(SENSOR_ALIGNMENT.align_opflow);
break;
case MSPCodes.MSP_SET_ADVANCED_CONFIG:
......@@ -2072,16 +2035,14 @@ var mspHelper = (function (gui) {
buffer.push(lowByte(FILTER_CONFIG.gyroNotchCutoff2));
buffer.push(highByte(FILTER_CONFIG.gyroNotchCutoff2));
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
buffer.push(lowByte(FILTER_CONFIG.accNotchHz));
buffer.push(highByte(FILTER_CONFIG.accNotchHz));
buffer.push(lowByte(FILTER_CONFIG.accNotchHz));
buffer.push(highByte(FILTER_CONFIG.accNotchHz));
buffer.push(lowByte(FILTER_CONFIG.accNotchCutoff));
buffer.push(highByte(FILTER_CONFIG.accNotchCutoff));
buffer.push(lowByte(FILTER_CONFIG.accNotchCutoff));
buffer.push(highByte(FILTER_CONFIG.accNotchCutoff));
buffer.push(lowByte(FILTER_CONFIG.gyroStage2LowpassHz));
buffer.push(highByte(FILTER_CONFIG.gyroStage2LowpassHz));
}
buffer.push(lowByte(FILTER_CONFIG.gyroStage2LowpassHz));
buffer.push(highByte(FILTER_CONFIG.gyroStage2LowpassHz));
break;
......@@ -2838,10 +2799,7 @@ var mspHelper = (function (gui) {
};
self.queryFcStatus = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, '2.0.0'))
MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false, callback);
else
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false, callback);
MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false, callback);
};
self.loadMisc = function (callback) {
......@@ -2853,12 +2811,7 @@ var mspHelper = (function (gui) {
};
self.loadOutputMapping = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, '2.0.0'))
MSP.send_message(MSPCodes.MSPV2_INAV_OUTPUT_MAPPING, false, false, callback);
else {
OUTPUT_MAPPING.flush();
callback();
}
MSP.send_message(MSPCodes.MSPV2_INAV_OUTPUT_MAPPING, false, false, callback);
};
self.loadBatteryConfig = function (callback) {
......@@ -3042,9 +2995,6 @@ var mspHelper = (function (gui) {
};
self._getSetting = function (name) {
if (semver.lt(CONFIG.flightControllerVersion, '2.0.0')) {
return self._getLegacySetting(name);
}
if (SETTINGS[name]) {
return Promise.resolve(SETTINGS[name]);
}
......@@ -3101,31 +3051,6 @@ var mspHelper = (function (gui) {
});
}
self._getLegacySetting = function (name) {
var promise;
if (SETTINGS) {
promise = Promise.resolve(SETTINGS);
} else {
promise = new Promise(function (resolve, reject) {
$.ajax({
url: chrome.runtime.getURL('/resources/settings.json'),
dataType: 'json',
error: function (jqXHR, text, error) {
reject(error);
},
success: function (data) {
SETTINGS = data;
resolve(data);
}
});
});
}
return promise.then(function (data) {
return data[name];
});
};
self._encodeSettingReference = function (name, index, data) {
if (Number.isInteger(index)) {
data.push8(0);
......@@ -3286,35 +3211,19 @@ var mspHelper = (function (gui) {
};
self.loadMixerConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.9.1")) {
MSP.send_message(MSPCodes.MSP2_INAV_MIXER, false, false, callback);
} else {
callback();
}
MSP.send_message(MSPCodes.MSP2_INAV_MIXER, false, false, callback);
};
self.saveMixerConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "1.9.1")) {
MSP.send_message(MSPCodes.MSP2_INAV_SET_MIXER, mspHelper.crunch(MSPCodes.MSP2_INAV_SET_MIXER), false, callback);
} else {
callback();
}
MSP.send_message(MSPCodes.MSP2_INAV_SET_MIXER, mspHelper.crunch(MSPCodes.MSP2_INAV_SET_MIXER), false, callback);
};
self.loadVTXConfig = function (callback) {
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
MSP.send_message(MSPCodes.MSP_VTX_CONFIG, false, false, callback);
} else {
callback();
}
MSP.send_message(MSPCodes.MSP_VTX_CONFIG, false, false, callback);
};
self.saveVTXConfig = function(callback) {
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
MSP.send_message(MSPCodes.MSP_SET_VTX_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_VTX_CONFIG), false, callback);
} else {
callback();
}
MSP.send_message(MSPCodes.MSP_SET_VTX_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_VTX_CONFIG), false, callback);
};
self.loadBrakingConfig = function(callback) {
......@@ -3334,22 +3243,18 @@ var mspHelper = (function (gui) {
};
self.loadParameterGroups = function(callback) {
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
MSP.send_message(MSPCodes.MSP2_COMMON_PG_LIST, false, false, function (resp) {
var groups = [];
while (resp.data.offset < resp.data.byteLength) {
var id = resp.data.readU16();
var start = resp.data.readU16();
var end = resp.data.readU16();
groups.push({id: id, start: start, end: end});
}
if (callback) {
callback(groups);
}
});
} else if (callback) {
callback();
}
MSP.send_message(MSPCodes.MSP2_COMMON_PG_LIST, false, false, function (resp) {
var groups = [];
while (resp.data.offset < resp.data.byteLength) {
var id = resp.data.readU16();
var start = resp.data.readU16();
var end = resp.data.readU16();
groups.push({id: id, start: start, end: end});
}
if (callback) {
callback(groups);
}
});
};
self.loadBrakingConfig = function(callback) {
......
......@@ -102,13 +102,7 @@ helper.periodicStatusUpdater = (function () {
}
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false);
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false);
} else {
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false);
}
MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false);
MSP.send_message(MSPCodes.MSP_ACTIVEBOXES, false, false);
MSP.send_message(MSPCodes.MSPV2_INAV_ANALOG, false, false);
......
......@@ -145,12 +145,6 @@ $(document).ready(function () {
var tab = tabClass.substring(4);
var tabName = $(self).text();
if (CONFIGURATOR.connectionValid && semver.lt(CONFIG.flightControllerVersion, "2.0.0")) {
$('#battery_profile_change').hide();
$('#profile_change').css('width', '125px');
$('#dataflash_wrapper_global').css('width', '125px');
}
if (tabRequiresConnection && !CONFIGURATOR.connectionValid) {
GUI.log(chrome.i18n.getMessage('tabSwitchConnectionRequired'));
return;
......
{
"manifest_version": 2,
"minimum_chrome_version": "38",
"version": "2.3.0",
"version": "2.3.0-RC3",
"author": "Several",
"name": "INAV - Configurator",
"short_name": "INAV",
......
This diff is collapsed.
{
"name": "inav-configurator",
"description": "INAV Configurator",
"version": "2.3.0",
"version": "2.3.0-RC3",
"main": "main.html",
"default_locale": "en",
"scripts": {
......
This diff is collapsed.
......@@ -10,21 +10,6 @@
</div>
</div>
<div class="leftWrapper">
<div class="mixer gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="configurationMixer"></div>
</div>
<div class="spacer_box">
<div class="mixerPreview half">
<img src="./resources/motor_order/custom.svg" />
</div>
<div class="half" style="width: calc(50% - 10px); margin-left: 10px;">
<select class="mixerList">
<!-- list generated here -->
</select>
</div>
</div>
</div>
<div class="config-section sensors gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="configurationSensors"></div>
......@@ -56,7 +41,7 @@
<label for="sensor-rangefinder"> <span data-i18n="sensorRangefinder"></span></label>
</div>
<div class="select requires-v2_0_0">
<div class="select">
<select id="sensor-opflow"></select>
<label for="sensor-opflow"> <span data-i18n="sensorOpflow"></span></label>
</div>
......@@ -418,7 +403,7 @@
<div class="features batteryVoltage"></div>
<!--list of generated features goes here-->
<div class="select requires-v2_0_0">
<div class="select">
<select id="voltagesource" class="voltagesource">
<option value="0">Raw</option>
<option value="1">Sag compensated</option>
......@@ -428,12 +413,12 @@
</label>
<div class="helpicon cf_tip" data-i18n_title="configurationVoltageSourceHelp"></div>
</div>
<div class="number requires-v2_0_0">
<div class="number">
<input type="number" id="cells" name="cells" step="1" min="0" max="8" />
<label for="cells"><span data-i18n="configurationBatteryCells"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationBatteryCellsHelp"></div>
</div>
<div class="number requires-v2_0_0">
<div class="number">
<input type="number" id="celldetectvoltage" name="celldetectvoltage" step="0.01" min="1" max="5" />
<label for="celldetectvoltage"><span data-i18n="configurationBatteryCellDetectVoltage"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationBatteryCellDetectVoltageHelp"></div>
......
......@@ -397,13 +397,8 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
// midrc was removed in 2.0, but the firmware still excepts
// the MSP frame with it for backwards compatibility, so we
// just hide it from the UI.
var midThrottleWrapper = $('.midthrottle_wrapper');