Add tooltips and refactor

10.3.x-maintenance
U-DESKTOP-12PPI61\boris.bozic 2016-08-05 12:39:43 +02:00
parent c61836cd32
commit f239b1bd9c
5 changed files with 81 additions and 42 deletions

View File

@ -791,29 +791,41 @@
"pidTuningPidSettings": {
"message": "PID Controller Settings"
},
"pidTuningRcSmoothing": {
"message": "RC Smoothing"
"pidTuningRcInterpolationHelp": {
"message": "RC TX/RX systems are not as fast as PID loops. That means that PID loop has gaps in the information stream from RC systems. This option enables interpolation of the RC input during the times when no RC frames are received. The option also offers cleaner P and D behaviour as there are no ramps in control input."
},
"pidTuningRcSmoothingOff": {
"pidTuningRcInterpolationIntervalHelp": {
"message": "Interpolation interval for manual RC interpolation mode in milliseconds"
},
"pidTuningRcInterpolation": {
"message": "RC Interpolation"
},
"pidTuningRcInterpolationOff": {
"message": "Off"
},
"pidTuningRcSmoothingDefault": {
"message": "Default"
"pidTuningRcInterpolationDefault": {
"message": "Preset"
},
"pidTuningRcSmoothingAuto": {
"pidTuningRcInterpolationAuto": {
"message": "Auto"
},
"pidTuningRcSmoothingManual": {
"pidTuningRcInterpolationManual": {
"message": "Manual"
},
"pidTuningRcSmoothingInterval": {
"message": "RC Smoothing Interval (ms)"
"pidTuningRcInterpolationInterval": {
"message": "RC Interpolating Interval (ms)"
},
"pidTuningPtermSetpoint": {
"message": "Pterm Setpoint Weight"
"message": "P Setpoint Weight"
},
"pidTuningDtermSetpoint": {
"message": "Dterm Setpoint Weight"
"message": "D Setpoint Weight"
},
"pidTuningPtermSetpointHelp": {
"message": "This parameter determines the transient behaviour of P on abrupt stick moves. Lower value gives less overshoot and smoother behaviour, but too low values can slow down the response. Value of 1 equals to legacy pid controller"
},
"pidTuningDtermSetpointHelp": {
"message": "This parameter determines the transient behaviour of D on stick inputs.<br> Value of 0 equals to old Measuemenent method where D only tracks gyro, while value of 1 equals to old Error method with equal gyro and stick tracking ratio.<br> Lower value equals to slower/smoother stick response, while higher value provides more stick acceleration response.<br> Note that RC interpolation is recommended to be enabled with higher values to prevent control kicks making noise"
},
"pidTuningProportional": {
"message": "Proportional"

View File

@ -295,8 +295,8 @@ var FC = {
spektrum_sat_bind: 0,
rx_min_usec: 0,
rx_max_usec: 0,
rcSmoothing: 0,
rcSmoothInterval: 0,
rcInterpolation: 0,
rcInterpolationInterval:0,
airModeActivateThreshold: 0
};

View File

@ -910,14 +910,14 @@ var MSP = {
RX_CONFIG.rx_max_usec = data.getUint16(offset, 1);
offset += 2;
if (semver.gte(CONFIG.apiVersion, "1.20.0")) {
RX_CONFIG.rcSmoothing = data.getUint8(offset, 1);
RX_CONFIG.rcInterpolation = data.getUint8(offset, 1);
offset++;
RX_CONFIG.rcSmoothInterval = data.getUint8(offset, 1);
RX_CONFIG.rcInterpolationInterval = data.getUint8(offset, 1);
offset++;
RX_CONFIG.airModeActivateThreshold = data.getUint16(offset, 1);
} else {
RX_CONFIG.rcSmoothing = 0;
RX_CONFIG.rcSmoothInterval = 0;
RX_CONFIG.rcInterpolation = 0;
RX_CONFIG.rcInterpolationInterval = 0;
RX_CONFIG.airModeActivateThreshold = 0;
}
break;
@ -1562,8 +1562,8 @@ MSP.crunch = function (code) {
buffer.push(lowByte(RX_CONFIG.rx_max_usec));
buffer.push(highByte(RX_CONFIG.rx_max_usec));
if (semver.gte(CONFIG.apiVersion, "1.20.0")) {
buffer.push(RX_CONFIG.rcSmoothing);
buffer.push(RX_CONFIG.rcSmoothInterval);
buffer.push(RX_CONFIG.rcInterpolation);
buffer.push(RX_CONFIG.rcInterpolationInterval);
buffer.push(lowByte(RX_CONFIG.airModeActivateThreshold));
buffer.push(highByte(RX_CONFIG.airModeActivateThreshold));
}

View File

@ -250,21 +250,35 @@
<tbody class="features pidTuning">
<!-- table generated here -->
</tbody>
<tr class="rcSmoothing">
<tr class="rcInterpolation">
<td>
<select name="rcSmoothing-select">
<option value="0" i18n="pidTuningRcSmoothingOff"/>
<option value="1" i18n="pidTuningRcSmoothingDefault"/>
<option value="2" i18n="pidTuningRcSmoothingAuto"/>
<option value="3" i18n="pidTuningRcSmoothingManual"/>
<select name="rcInterpolation-select">
<option value="0" i18n="pidTuningRcInterpolationOff"/>
<option value="1" i18n="pidTuningRcInterpolationDefault"/>
<option value="2" i18n="pidTuningRcInterpolationAuto"/>
<option value="3" i18n="pidTuningRcInterpolationManual"/>
</select>
</td>
<td colspan=2 i18n="pidTuningRcSmoothing"></td>
<td colspan=2>
<div>
<label>
<span i18n="pidTuningRcInterpolation"></span>
</label>
<div class="helpicon cf_tip" i18n_title="pidTuningRcInterpolationHelp"></div>
</div>
</td>
</tr>
<tr class="rcInterpolationInterval">
<td><input type="number" class="nonProfile" name="rcInterpolationInterval-number" step="1" min="1" max="50"/></td>
<td colspan=2>
<div>
<label>
<span i18n="pidTuningRcInterpolationInterval"></span>
</label>
<div class="helpicon cf_tip" i18n_title="pidTuningRcInterpolationIntervalHelp"></div>
</div>
</td>
</tr>
<tr class="rcSmoothingInterval">
<td><input type="number" class="nonProfile" name="rcSmoothingInterval-number" step="1" min="1" max="50"/></td>
<td colspan=2 i18n="pidTuningRcSmoothingInterval"></td>
</td>
</table>
</div>
<div class="gui_box grey topspacer">
@ -293,15 +307,28 @@
<tr class="ptermSetpoint">
<td><input type="number" name="ptermSetpoint-number" step="0.01" min="0.30" max="1.00"/></td>
<td class="slider"><input type="range" name="ptermSetpoint-range" step="0.01" min="0.30" max="1.00"/></td>
<td i18n="pidTuningPtermSetpoint"></td>
<td colspan=2>
<div>
<label>
<span i18n="pidTuningPtermSetpoint"></span>
</label>
<div class="helpicon cf_tip" i18n_title="pidTuningPtermSetpointHelp"></div>
</div>
</td>
</tr>
<tr class="dtermSetpoint">
<td><input type="number" name="dtermSetpoint-number" step="0.01" min="0.00" max="3.00"/></td>
<td class="slider"><input type="range" name="dtermSetpoint-range" step="0.01" min="0.00" max="3.00"/></td>
<td i18n="pidTuningDtermSetpoint"></td>
<td><input type="number" name="dtermSetpoint-number" step="0.01" min="0.00" max="2.00"/></td>
<td class="slider"><input type="range" name="dtermSetpoint-range" step="0.01" min="0.00" max="2.00"/></td>
<td colspan=2>
<div>
<label>
<span i18n="pidTuningDtermSetpoint"></span>
</label>
<div class="helpicon cf_tip" i18n_title="pidTuningDtermSetpointHelp"></div>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" name="vbatpidcompensation" class="toggle" /></td>
<td><input type="checkbox" name="vbatpidcompensation" class="toggle" /></td>
<td colspan=2>
<div>
<label for="vbatpidcompensation">

View File

@ -67,9 +67,9 @@ TABS.pid_tuning.initialize = function (callback) {
}
if (semver.gte(CONFIG.flightControllerVersion, '3.0.0')) {
$('select[name="rcSmoothing-select"]').val(RX_CONFIG.rcSmoothing);
$('select[name="rcInterpolation-select"]').val(RX_CONFIG.rcInterpolation);
$('input[name="rcSmoothingInterval-number"]').val(RX_CONFIG.rcSmoothInterval);
$('input[name="rcInterpolationInterval-number"]').val(RX_CONFIG.rcInterpolationInterval);
$('input[name="ptermSetpoint-number"]').val(ADVANCED_TUNING.ptermSetpointWeight / 100);
$('input[name="ptermSetpoint-range"]').val(ADVANCED_TUNING.ptermSetpointWeight / 100);
@ -258,9 +258,9 @@ TABS.pid_tuning.initialize = function (callback) {
}
if (semver.gte(CONFIG.flightControllerVersion, '3.0.0')) {
RX_CONFIG.rcSmoothing = parseInt($('select[name="rcSmoothing-select"]').val());
RX_CONFIG.rcInterpolation = parseInt($('select[name="rcInterpolation-select"]').val());
RX_CONFIG.rcSmoothInterval = parseInt($('input[name="rcSmoothingInterval-number"]').val());
RX_CONFIG.rcInterpolationInterval = parseInt($('input[name="rcInterpolationInterval-number"]').val());
ADVANCED_TUNING.ptermSetpointWeight = parseInt($('input[name="ptermSetpoint-number"]').val() * 100);
@ -551,8 +551,8 @@ TABS.pid_tuning.initialize = function (callback) {
} else {
$('.tab-pid_tuning .rate_profile').hide();
$('.pid-tuning .rcSmoothing').hide();
$('.pid-tuning .rcSmoothingInterval').hide();
$('.pid-tuning .rcInterpolation').hide();
$('.pid-tuning .rcInterpolationInterval').hide();
$('.pid-tuning .ptermSetpoint').hide();
$('.pid-tuning .dtermSetpoint').hide();