Cleaned up configuration tab.
parent
9c50885f69
commit
847b7ef12b
|
@ -641,12 +641,6 @@
|
||||||
"configurationDisarmKillSwitch": {
|
"configurationDisarmKillSwitch": {
|
||||||
"message": "Disarm motors regardless of throttle value (When arming via AUX channel)"
|
"message": "Disarm motors regardless of throttle value (When arming via AUX channel)"
|
||||||
},
|
},
|
||||||
"configurationMidRc": {
|
|
||||||
"message": "Center value for RC channels"
|
|
||||||
},
|
|
||||||
"configurationMidRcHelp": {
|
|
||||||
"message": "This is the center value <span style=\"font-weight: bold\">for all RC channels</span>. Set this to the value that your transmitter sends when the stick is centered for a channel. To adjust the thrust at throttle mid position, change the 'Trottle MID' value on the PID Tuning tab."
|
|
||||||
},
|
|
||||||
"configurationDigitalIdlePercent": {
|
"configurationDigitalIdlePercent": {
|
||||||
"message": "Motor Idle Throttle Value (percent)"
|
"message": "Motor Idle Throttle Value (percent)"
|
||||||
},
|
},
|
||||||
|
@ -979,6 +973,12 @@
|
||||||
"receiverThrottleExpo": {
|
"receiverThrottleExpo": {
|
||||||
"message": "Throttle EXPO"
|
"message": "Throttle EXPO"
|
||||||
},
|
},
|
||||||
|
"receiverMidRc": {
|
||||||
|
"message": "Center value for RC channels"
|
||||||
|
},
|
||||||
|
"receiverMidRcHelp": {
|
||||||
|
"message": "This is the center value <span style=\"font-weight: bold\">for all RC channels</span>. Set this to the value that your transmitter sends when the stick is centered for a channel. To adjust the thrust at throttle mid position, change the 'Trottle MID' value on the PID Tuning tab."
|
||||||
|
},
|
||||||
"receiverDeadband": {
|
"receiverDeadband": {
|
||||||
"message": "RC Deadband"
|
"message": "RC Deadband"
|
||||||
},
|
},
|
||||||
|
|
1
js/fc.js
1
js/fc.js
|
@ -185,7 +185,6 @@ var FC = {
|
||||||
};
|
};
|
||||||
|
|
||||||
MISC = {
|
MISC = {
|
||||||
midrc: 0,
|
|
||||||
minthrottle: 0,
|
minthrottle: 0,
|
||||||
maxthrottle: 0,
|
maxthrottle: 0,
|
||||||
mincommand: 0,
|
mincommand: 0,
|
||||||
|
|
|
@ -205,7 +205,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP_MISC: // 22 bytes
|
case MSPCodes.MSP_MISC: // 22 bytes
|
||||||
MISC.midrc = data.readU16();
|
RX_CONFIG.midrc = data.readU16();
|
||||||
MISC.minthrottle = data.readU16(); // 0-2000
|
MISC.minthrottle = data.readU16(); // 0-2000
|
||||||
MISC.maxthrottle = data.readU16(); // 0-2000
|
MISC.maxthrottle = data.readU16(); // 0-2000
|
||||||
MISC.mincommand = data.readU16(); // 0-2000
|
MISC.mincommand = data.readU16(); // 0-2000
|
||||||
|
@ -1029,7 +1029,7 @@ MspHelper.prototype.crunch = function(code) {
|
||||||
buffer.push16(FC_CONFIG.loopTime);
|
buffer.push16(FC_CONFIG.loopTime);
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP_SET_MISC:
|
case MSPCodes.MSP_SET_MISC:
|
||||||
buffer.push16(MISC.midrc)
|
buffer.push16(RX_CONFIG.midrc)
|
||||||
.push16(MISC.minthrottle)
|
.push16(MISC.minthrottle)
|
||||||
.push16(MISC.maxthrottle)
|
.push16(MISC.maxthrottle)
|
||||||
.push16(MISC.mincommand)
|
.push16(MISC.mincommand)
|
||||||
|
|
|
@ -82,15 +82,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="number">
|
|
||||||
<label>
|
|
||||||
<div class="numberspacer">
|
|
||||||
<input type="number" name="midrc" min="0" max="2000" />
|
|
||||||
</div>
|
|
||||||
<span i18n="configurationMidRc"></span>
|
|
||||||
<div class="helpicon cf_tip" i18n_title="configurationMidRcHelp"></div>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="number digitalIdlePercent">
|
<div class="number digitalIdlePercent">
|
||||||
<label>
|
<label>
|
||||||
<div class="numberspacer">
|
<div class="numberspacer">
|
||||||
|
@ -361,33 +352,33 @@
|
||||||
<!-- table generated here -->
|
<!-- table generated here -->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="select batterymetertype">
|
<div class="select batterymetertype vbatmonitoring">
|
||||||
<label>
|
<label>
|
||||||
<select class="batterymetertype"><!-- list generated here --></select>
|
<select class="batterymetertype"><!-- list generated here --></select>
|
||||||
<span i18n="configurationBatteryMeterType"></span>
|
<span i18n="configurationBatteryMeterType"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number vbatmonitoring">
|
||||||
<label> <input type="number" name="mincellvoltage" step="0.1" min="1" max="5" /> <span
|
<label> <input type="number" name="mincellvoltage" step="0.1" min="1" max="5" /> <span
|
||||||
i18n="configurationBatteryMinimum"></span>
|
i18n="configurationBatteryMinimum"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number vbatmonitoring">
|
||||||
<label> <input type="number" name="maxcellvoltage" step="0.1" min="1" max="5" /> <span
|
<label> <input type="number" name="maxcellvoltage" step="0.1" min="1" max="5" /> <span
|
||||||
i18n="configurationBatteryMaximum"></span>
|
i18n="configurationBatteryMaximum"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number vbatmonitoring">
|
||||||
<label> <input type="number" name="warningcellvoltage" step="0.1" min="1" max="5" /> <span
|
<label> <input type="number" name="warningcellvoltage" step="0.1" min="1" max="5" /> <span
|
||||||
i18n="configurationBatteryWarning"></span>
|
i18n="configurationBatteryWarning"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number vbatmonitoring vbatCalibration">
|
||||||
<label> <input type="number" name="voltagescale" step="1" min="10" max="255" /> <span
|
<label> <input type="number" name="voltagescale" step="1" min="10" max="255" /> <span
|
||||||
i18n="configurationBatteryScale"></span>
|
i18n="configurationBatteryScale"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number vbatmonitoring">
|
||||||
<label> <input type="text" name="batteryvoltage" readonly class="disabled" /> <span
|
<label> <input type="text" name="batteryvoltage" readonly class="disabled" /> <span
|
||||||
i18n="configurationBatteryVoltage"></span>
|
i18n="configurationBatteryVoltage"></span>
|
||||||
</label>
|
</label>
|
||||||
|
@ -411,29 +402,29 @@
|
||||||
<!-- table generated here -->
|
<!-- table generated here -->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="select">
|
<div class="select currentMonitoring">
|
||||||
<label>
|
<label>
|
||||||
<select class="currentmetertype"><!-- list generated here --></select>
|
<select class="currentmetertype"><!-- list generated here --></select>
|
||||||
<span i18n="configurationCurrentMeterType"></span>
|
<span i18n="configurationCurrentMeterType"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number currentMonitoring currentCalibration">
|
||||||
<label> <input type="number" name="currentscale" step="1" min="-16000" max="16000" /> <span
|
<label> <input type="number" name="currentscale" step="1" min="-16000" max="16000" /> <span
|
||||||
i18n="configurationCurrentScale"></span>
|
i18n="configurationCurrentScale"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number currentMonitoring currentCalibration">
|
||||||
<label> <input type="number" name="currentoffset" step="1" min="-1600" max="16000" /> <span
|
<label> <input type="number" name="currentoffset" step="1" min="-1600" max="16000" /> <span
|
||||||
i18n="configurationCurrentOffset"></span>
|
i18n="configurationCurrentOffset"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">
|
<div class="number currentMonitoring currentOutput">
|
||||||
<label>
|
<label>
|
||||||
<input type="text" name="batterycurrent" readonly class="disabled" /> <span
|
<input type="text" name="batterycurrent" readonly class="disabled" /> <span
|
||||||
i18n="configurationBatteryCurrent"></span>
|
i18n="configurationBatteryCurrent"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox currentMonitoring currentOutput">
|
||||||
<div class="numberspacer">
|
<div class="numberspacer">
|
||||||
<input type="checkbox" name="multiwiicurrentoutput" class="toggle" />
|
<input type="checkbox" name="multiwiicurrentoutput" class="toggle" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -458,7 +458,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill throttle
|
// fill throttle
|
||||||
$('input[name="midrc"]').val(MISC.midrc);
|
|
||||||
var minThrottle_e = $('input[name="minthrottle"]');
|
var minThrottle_e = $('input[name="minthrottle"]');
|
||||||
minThrottle_e.val(MISC.minthrottle);
|
minThrottle_e.val(MISC.minthrottle);
|
||||||
$('input[name="maxthrottle"]').val(MISC.maxthrottle);
|
$('input[name="maxthrottle"]').val(MISC.maxthrottle);
|
||||||
|
@ -497,7 +496,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
batteryMeterType_e.change(function () {
|
batteryMeterType_e.change(function () {
|
||||||
MISC.batterymetertype = parseInt($(this).val());
|
MISC.batterymetertype = parseInt($(this).val());
|
||||||
checkDisableVbatControls();
|
checkUpdateVbatControls();
|
||||||
});
|
});
|
||||||
batteryMeterType_e.val(MISC.batterymetertype).change();
|
batteryMeterType_e.val(MISC.batterymetertype).change();
|
||||||
} else {
|
} else {
|
||||||
|
@ -527,7 +526,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
currentMeterType_e.change(function () {
|
currentMeterType_e.change(function () {
|
||||||
BF_CONFIG.currentmetertype = parseInt($(this).val());
|
BF_CONFIG.currentmetertype = parseInt($(this).val());
|
||||||
checkDisableCurrentControls();
|
checkUpdateCurrentControls();
|
||||||
});
|
});
|
||||||
currentMeterType_e.val(BF_CONFIG.currentmetertype).change();
|
currentMeterType_e.val(BF_CONFIG.currentmetertype).change();
|
||||||
|
|
||||||
|
@ -574,54 +573,43 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkDisableVbatControls() {
|
function checkUpdateVbatControls() {
|
||||||
function disableBatteryControls(disabled) {
|
if (BF_CONFIG.features.isEnabled('VBAT')) {
|
||||||
$('input[name="mincellvoltage"]').prop('disabled', disabled);
|
$('.vbatmonitoring').show();
|
||||||
$('input[name="maxcellvoltage"]').prop('disabled', disabled);
|
|
||||||
$('input[name="warningcellvoltage"]').prop('disabled', disabled);
|
|
||||||
$('input[name="voltagescale"]').prop('disabled', disabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
|
||||||
if (BF_CONFIG.features.isEnabled('VBAT')) {
|
$('select.batterymetertype').show();
|
||||||
$('select.batterymetertype').prop('disabled', false);
|
|
||||||
|
|
||||||
if (MISC.batterymetertype == 1) {
|
if (MISC.batterymetertype !== 0) {
|
||||||
disableBatteryControls(true);
|
$('.vbatCalibration').hide();
|
||||||
} else {
|
}
|
||||||
disableBatteryControls(false);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$('select.batterymetertype').prop('disabled', true);
|
$('select.batterymetertype').hide();
|
||||||
|
|
||||||
disableBatteryControls(true);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (BF_CONFIG.features.isEnabled('VBAT')) {
|
$('.vbatmonitoring').hide();
|
||||||
disableBatteryControls(false);
|
|
||||||
} else {
|
|
||||||
disableBatteryControls(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkDisableCurrentControls() {
|
function checkUpdateCurrentControls() {
|
||||||
if (BF_CONFIG.features.isEnabled('CURRENT_METER')) {
|
if (BF_CONFIG.features.isEnabled('CURRENT_METER')) {
|
||||||
$('select.currentmetertype').prop('disabled', false);
|
$('.currentMonitoring').show();
|
||||||
if (BF_CONFIG.currentmetertype == 0 || BF_CONFIG.currentmetertype == 3) {
|
|
||||||
$('input[name="currentscale"]').prop('disabled', true);
|
switch(BF_CONFIG.currentmetertype) {
|
||||||
$('input[name="currentoffset"]').prop('disabled', true);
|
case 0:
|
||||||
$('input[name="multiwiicurrentoutput"]').prop('disabled', true);
|
$('.currentCalibration').hide();
|
||||||
} else {
|
$('.currentOutput').hide();
|
||||||
$('input[name="currentscale"]').prop('disabled', false);
|
|
||||||
$('input[name="currentoffset"]').prop('disabled', false);
|
break;
|
||||||
$('input[name="multiwiicurrentoutput"]').prop('disabled', false);
|
case 3:
|
||||||
|
$('.currentCalibration').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BF_CONFIG.currentmetertype !== 1 && BF_CONFIG.currentmetertype !== 2) {
|
||||||
|
$('.currentCalibration').hide();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$('select.currentmetertype').prop('disabled', true);
|
$('.currentMonitoring').hide();
|
||||||
$('input[name="currentscale"]').prop('disabled', true);
|
|
||||||
$('input[name="currentoffset"]').prop('disabled', true);
|
|
||||||
$('input[name="multiwiicurrentoutput"]').prop('disabled', true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,16 +625,16 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(features_e).filter('tbody.features.batteryVoltage').change(function() {
|
$(features_e).filter('tbody.features.batteryVoltage').change(function() {
|
||||||
checkDisableVbatControls();
|
checkUpdateVbatControls();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(features_e).filter('tbody.features.batteryCurrent').change(function() {
|
$(features_e).filter('tbody.features.batteryCurrent').change(function() {
|
||||||
checkDisableCurrentControls();
|
checkUpdateCurrentControls();
|
||||||
});
|
});
|
||||||
|
|
||||||
checkShowSerialRxBox();
|
checkShowSerialRxBox();
|
||||||
checkDisableVbatControls();
|
checkUpdateVbatControls();
|
||||||
checkDisableCurrentControls();
|
checkUpdateCurrentControls();
|
||||||
|
|
||||||
$("input[id='unsyncedPWMSwitch']").change(function() {
|
$("input[id='unsyncedPWMSwitch']").change(function() {
|
||||||
if ($(this).is(':checked')) {
|
if ($(this).is(':checked')) {
|
||||||
|
@ -672,7 +660,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
ARMING_CONFIG.disarm_kill_switch = $('input[id="disarmkillswitch"]').is(':checked') ? 1 : 0;
|
ARMING_CONFIG.disarm_kill_switch = $('input[id="disarmkillswitch"]').is(':checked') ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MISC.midrc = parseInt($('input[name="midrc"]').val());
|
|
||||||
MISC.minthrottle = parseInt($('input[name="minthrottle"]').val());
|
MISC.minthrottle = parseInt($('input[name="minthrottle"]').val());
|
||||||
MISC.maxthrottle = parseInt($('input[name="maxthrottle"]').val());
|
MISC.maxthrottle = parseInt($('input[name="maxthrottle"]').val());
|
||||||
MISC.mincommand = parseInt($('input[name="mincommand"]').val());
|
MISC.mincommand = parseInt($('input[name="mincommand"]').val());
|
||||||
|
|
|
@ -35,20 +35,32 @@
|
||||||
<div class="gui_box tunings grey" style="float: right;">
|
<div class="gui_box tunings grey" style="float: right;">
|
||||||
<table class="deadband" width="100%">
|
<table class="deadband" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th i18n="receiverDeadband"></th>
|
<th i18n="receiverMidRc">
|
||||||
<th i18n="receiverYawDeadband"></th>
|
</th>
|
||||||
|
<th i18n="receiverDeadband">
|
||||||
|
</th>
|
||||||
|
<th i18n="receiverYawDeadband">
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="cf_tip" i18n_title="receiverHelpDeadband">
|
<div class="numberspacer">
|
||||||
<input type="number" name="deadband" step="1" min="0" max="32" />
|
<input type="number" name="midrc" min="1200" max="1700" />
|
||||||
|
<div class="helpicon cf_tip" i18n_title="receiverMidRcHelp"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="cf_tip" i18n_title="receiverHelpYawDeadband">
|
<div>
|
||||||
<input type="number" name="yaw_deadband" step="1" min="0" max="100" />
|
<input type="number" name="deadband" step="1" min="0" max="32" />
|
||||||
|
<div class="helpicon cf_tip" i18n_title="receiverHelpDeadband"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<input type="number" name="yaw_deadband" step="1" min="0" max="100" />
|
||||||
|
<div class="helpicon cf_tip" i18n_title="receiverHelpYawDeadband"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -74,6 +74,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
if (semver.lt(CONFIG.apiVersion, "1.15.0")) {
|
if (semver.lt(CONFIG.apiVersion, "1.15.0")) {
|
||||||
$('.deadband').hide();
|
$('.deadband').hide();
|
||||||
} else {
|
} else {
|
||||||
|
$('.deadband input[name="midrc"]').val(RX_CONFIG.midrc);
|
||||||
$('.deadband input[name="yaw_deadband"]').val(RC_deadband.yaw_deadband);
|
$('.deadband input[name="yaw_deadband"]').val(RC_deadband.yaw_deadband);
|
||||||
$('.deadband input[name="deadband"]').val(RC_deadband.deadband);
|
$('.deadband input[name="deadband"]').val(RC_deadband.deadband);
|
||||||
|
|
||||||
|
@ -236,8 +237,9 @@ TABS.receiver.initialize = function (callback) {
|
||||||
|
|
||||||
$('a.update').click(function () {
|
$('a.update').click(function () {
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.15.0")) {
|
if (semver.gte(CONFIG.apiVersion, "1.15.0")) {
|
||||||
RC_deadband.yaw_deadband = parseInt($('.deadband input[name="yaw_deadband"]').val());
|
RX_CONFIG.midrc = parseInt($('.deadband input[name="midrc"]').val());
|
||||||
RC_deadband.deadband = parseInt($('.deadband input[name="deadband"]').val());
|
RC_deadband.yaw_deadband = parseInt($('.deadband input[name="yaw_deadband"]').val());
|
||||||
|
RC_deadband.deadband = parseInt($('.deadband input[name="deadband"]').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
// catch rc map
|
// catch rc map
|
||||||
|
|
Loading…
Reference in New Issue