1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 17:25:14 +03:00
This commit is contained in:
Pawel Spychalski (DzikuVx) 2016-11-20 18:24:20 +01:00
parent 4d2882e353
commit e231aed13a
5 changed files with 100 additions and 80 deletions

View file

@ -75,11 +75,14 @@
"message": "Ports"
},
"tabPidTuning": {
"message": "PID Tuning"
"message": "PID tuning"
},
"tabReceiver": {
"message": "Receiver"
},
"tabMisc": {
"message": "Miscelanous"
},
"tabModeSelection": {
"message": "Mode Selection"
},
@ -1801,5 +1804,11 @@
},
"axisAccelerationLimitYawHelp": {
"message": "This is maximum angular acceleration rate pilot is allowed to require from UAV. UAV should be able to satisfy this accelaration rate. As a rule of thumb, the bigger the UAV, to lower acceleration it can handle"
},
"pidTuningTPAHelp": {
"message": "Throttle PID Attenuation factor. PID gains will be reduced lineary starting from 0 at TPA Breakpoint (Throttle) to TPA factor at max throttle"
},
"pidTuningTPABreakPointHelp": {
"message": "Throttle PID Attenuation begins when Throttle position exceeds this value. "
}
}

View file

@ -400,7 +400,7 @@ var MSP = {
RC_tuning.yaw_rate = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
}
RC_tuning.dynamic_THR_PID = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
RC_tuning.dynamic_THR_PID = parseInt(data.getUint8(offset++));
RC_tuning.throttle_MID = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
RC_tuning.throttle_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2));
if (semver.gte(CONFIG.apiVersion, "1.7.0")) {
@ -1345,7 +1345,7 @@ MSP.crunch = function (code) {
buffer.push(Math.round(RC_tuning.yaw_rate * 100));
}
buffer.push(Math.round(RC_tuning.dynamic_THR_PID * 100));
buffer.push(RC_tuning.dynamic_THR_PID);
buffer.push(Math.round(RC_tuning.throttle_MID * 100));
buffer.push(Math.round(RC_tuning.throttle_EXPO * 100));
if (semver.gte(CONFIG.apiVersion, "1.7.0")) {

View file

@ -1,7 +1,7 @@
/*.rate-tpa.rate-tpa--inav input[type="number"],*/
.rate-tpa_input {
margin: 4px;
width: auto;
width: 5em;
border: 1px solid silver;
border-radius: 3px;
display: inline-block;
@ -10,13 +10,15 @@
}
.rate-tpa.rate-tpa--inav td,
.rate-tpa.rate-tpa--filtering td {
.rate-tpa.rate-tpa--filtering td,
.rate-tpa.rate-tpa--misc td {
background-color: #DEDEDE;
width: auto;
border-bottom: 1px solid #ccc;
}
.tab-pid_tuning .rate-tpa.rate-tpa--filtering th {
.tab-pid_tuning .rate-tpa.rate-tpa--filtering th,
.tab-pid_tuning .rate-tpa.rate-tpa--misc th {
width: 18em;
}

View file

@ -175,60 +175,6 @@
</tr>
</tbody>
</table>
<table class="rate-tpa rate-tpa--inav requires-v1_4">
<tbody>
<tr>
<th i18n="yawJumpPreventionLimit"></th>
<td >
<input type="number" id="yawJumpPreventionLimit" class="rate-tpa_input" step="10" min="80" max="500" />
<div class="helpicon cf_tip" i18n_title="yawJumpPreventionLimitHelp"></div>
</td>
</tr>
<tr>
<th i18n="yawPLimit"></th>
<td >
<input type="number" id="yawPLimit" class="rate-tpa_input" step="10" min="100" max="500" />
<div class="helpicon cf_tip" i18n_title="yawPLimitHelp"></div>
</td>
</tr>
</tbody>
</table>
<table class="rate-tpa rate-tpa--inav requires-v1_4">
<tbody>
<tr>
<th i18n="rollPitchItermIgnoreRate"></th>
<td >
<input type="number" id="rollPitchItermIgnoreRate" class="rate-tpa_input" step="5" min="15" max="1000" />
<div class="helpicon cf_tip" i18n_title="rollPitchItermIgnoreRateHelp"></div>
</td>
</tr>
<tr>
<th i18n="yawItermIgnoreRate"></th>
<td >
<input type="number" id="yawItermIgnoreRate" class="rate-tpa_input" step="5" min="15" max="1000" />
<div class="helpicon cf_tip" i18n_title="yawItermIgnoreRateHelp"></div>
</td>
</tr>
</tbody>
</table>
<table class="rate-tpa rate-tpa--inav requires-v1_4">
<tbody>
<tr>
<th i18n="axisAccelerationLimitRollPitch"></th>
<td >
<input type="number" id="axisAccelerationLimitRollPitch" class="rate-tpa_input" step="10" min="0" max="655350" />
<div class="helpicon cf_tip" i18n_title="axisAccelerationLimitRollPitchHelp"></div>
</td>
</tr>
<tr>
<th i18n="axisAccelerationLimitYaw"></th>
<td >
<input type="number" id="axisAccelerationLimitYaw" class="rate-tpa_input" step="10" min="0" max="655350" />
<div class="helpicon cf_tip" i18n_title="axisAccelerationLimitYawHelp"></div>
</td>
</tr>
</tbody>
</table>
<table class="rate-tpa rate-tpa--no-dps cf">
<thead>
<tr>
@ -249,22 +195,6 @@
</tr>
</tbody>
</table>
<table class="rate-tpa cf">
<thead>
<tr>
<th i18n="pidTuningTPA"></th>
<th class="tpa-breakpoint" i18n="pidTuningTPABreakPoint"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="leftzero"><input class="rate-tpa_input" type="number" name="tpa" step="0.01" min="0"
max="1.00" /></td>
<td class="tpa-breakpoint"><input class="rate-tpa_input" type="number" name="tpa-breakpoint" step="10"
min="1000" max="2000" /></td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
@ -287,6 +217,13 @@
<div class="helpicon cf_tip" i18n_title="accLpfCutoffFrequencyHelp"></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cf_column half requires-v1_4">
<table class="spacer_left rate-tpa rate-tpa--filtering">
<tbody>
<tr>
<th i18n="dtermLpfCutoffFrequency"></th>
<td>
@ -304,6 +241,78 @@
</tbody>
</table>
</div>
<div class="clear-both requires-v1_4"></div>
<div class="tab_title requires-v1_4" i18n="tabMisc" style="margin-top: 1em;"></div>
<div class="cf_column half requires-v1_4">
<table class="rate-tpa rate-tpa--misc">
<tr>
<th i18n="yawJumpPreventionLimit"></th>
<td >
<input type="number" id="yawJumpPreventionLimit" class="rate-tpa_input" step="10" min="80" max="500" />
<div class="helpicon cf_tip" i18n_title="yawJumpPreventionLimitHelp"></div>
</td>
</tr>
<tr>
<th i18n="yawPLimit"></th>
<td >
<input type="number" id="yawPLimit" class="rate-tpa_input" step="10" min="100" max="500" />
<div class="helpicon cf_tip" i18n_title="yawPLimitHelp"></div>
</td>
</tr>
<tr>
<th i18n="rollPitchItermIgnoreRate"></th>
<td >
<input type="number" id="rollPitchItermIgnoreRate" class="rate-tpa_input" step="5" min="15" max="1000" />
<div class="helpicon cf_tip" i18n_title="rollPitchItermIgnoreRateHelp"></div>
</td>
</tr>
<tr>
<th i18n="yawItermIgnoreRate"></th>
<td >
<input type="number" id="yawItermIgnoreRate" class="rate-tpa_input" step="5" min="15" max="1000" />
<div class="helpicon cf_tip" i18n_title="yawItermIgnoreRateHelp"></div>
</td>
</tr>
</table>
</div>
<div class="cf_column half requires-v1_4">
<table class="spacer_left rate-tpa rate-tpa--filtering">
<tbody>
<tr>
<th i18n="axisAccelerationLimitRollPitch"></th>
<td >
<input type="number" id="axisAccelerationLimitRollPitch" class="rate-tpa_input" step="10" min="0" max="655350" />
dps^2
<div class="helpicon cf_tip" i18n_title="axisAccelerationLimitRollPitchHelp"></div>
</td>
</tr>
<tr>
<th i18n="axisAccelerationLimitYaw"></th>
<td >
<input type="number" id="axisAccelerationLimitYaw" class="rate-tpa_input" step="10" min="0" max="655350" />
dps^2
<div class="helpicon cf_tip" i18n_title="axisAccelerationLimitYawHelp"></div>
</td>
</tr>
<tr>
<th i18n="pidTuningTPA"></th>
<td >
<input type="number" class="rate-tpa_input" id="tpa" step="1" min="0" max="100" />
%
<div class="helpicon cf_tip" i18n_title="pidTuningTPAHelp"></div>
</td>
</tr>
<tr>
<th i18n="pidTuningTPABreakPoint"></th>
<td >
<input type="number" class="rate-tpa_input" id="tpa-breakpoint" step="10" min="1000" max="2000" />
<div class="helpicon cf_tip" i18n_title="pidTuningTPABreakPointHelp"></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="clear-both"></div>
<div class="content_toolbar">

View file

@ -105,8 +105,8 @@ TABS.pid_tuning.initialize = function (callback) {
$('.rate-tpa input[name="yaw"]').val(RC_tuning.yaw_rate.toFixed(2));
}
$('.rate-tpa input[name="tpa"]').val(RC_tuning.dynamic_THR_PID.toFixed(2));
$('.rate-tpa input[name="tpa-breakpoint"]').val(RC_tuning.dynamic_THR_breakpoint);
$('#tpa').val(RC_tuning.dynamic_THR_PID);
$('#tpa-breakpoint').val(RC_tuning.dynamic_THR_breakpoint);
}
function form_to_pid_and_rc() {
@ -125,8 +125,8 @@ TABS.pid_tuning.initialize = function (callback) {
RC_tuning.roll_rate = parseFloat($('.rate-tpa input[name="roll"]:visible').val());
RC_tuning.pitch_rate = parseFloat($('.rate-tpa input[name="pitch"]:visible').val());
RC_tuning.yaw_rate = parseFloat($('.rate-tpa input[name="yaw"]:visible').val());
RC_tuning.dynamic_THR_PID = parseFloat($('.rate-tpa input[name="tpa"]').val());
RC_tuning.dynamic_THR_breakpoint = parseInt($('.rate-tpa input[name="tpa-breakpoint"]').val());
RC_tuning.dynamic_THR_PID = parseInt($('#tpa').val());
RC_tuning.dynamic_THR_breakpoint = parseInt($('#tpa-breakpoint').val());
}
function hideUnusedPids(sensors_detected) {
$('.tab-pid_tuning table.pid_tuning').hide();