CF/BF - Disable ESC Sensor and virtual current meter sources for OSD
Slave boards.10.3.x-maintenance
parent
bf0fcb5643
commit
a4da6240a1
|
@ -141,12 +141,17 @@ TABS.power.initialize = function (callback) {
|
|||
$('input[name="warningcellvoltage"]').val(BATTERY_CONFIG.vbatwarningcellvoltage);
|
||||
$('input[name="capacity"]').val(BATTERY_CONFIG.capacity);
|
||||
|
||||
var haveFc = (semver.lt(CONFIG.apiVersion, "1.35.0") || (CONFIG.boardType == 0 || CONFIG.boardType == 2));
|
||||
|
||||
var batteryMeterTypes = [
|
||||
'None',
|
||||
'Onboard ADC',
|
||||
'ESC Sensor'
|
||||
];
|
||||
|
||||
if (haveFc) {
|
||||
batteryMeterTypes.push('ESC Sensor');
|
||||
}
|
||||
|
||||
var batteryMeterType_e = $('select.batterymetersource');
|
||||
for (var i = 0; i < batteryMeterTypes.length; i++) {
|
||||
batteryMeterType_e.append('<option value="' + i + '">' + batteryMeterTypes[i] + '</option>');
|
||||
|
@ -161,10 +166,13 @@ TABS.power.initialize = function (callback) {
|
|||
var currentMeterTypes = [
|
||||
'None',
|
||||
'Onboard ADC',
|
||||
'Virtual',
|
||||
'ESC Sensor'
|
||||
];
|
||||
|
||||
if (haveFc) {
|
||||
currentMeterTypes.push('Virtual');
|
||||
currentMeterTypes.push('ESC Sensor');
|
||||
}
|
||||
|
||||
var currentMeterType_e = $('select.currentmetersource');
|
||||
for (var i = 0; i < currentMeterTypes.length; i++) {
|
||||
currentMeterType_e.append('<option value="' + i + '">' + currentMeterTypes[i] + '</option>');
|
||||
|
|
Loading…
Reference in New Issue