Merge https://github.com/tricopterY/cleanflight-configurator into tricopterY-development
Conflicts: tabs/pid_tuning.html tabs/pid_tuning.js10.3.x-maintenance
commit
5683314f93
|
@ -573,6 +573,9 @@
|
|||
"pidTuningTPA": {
|
||||
"message": "TPA"
|
||||
},
|
||||
"pidTuningTPABreakPoint": {
|
||||
"message": "TPA Breakpoint"
|
||||
},
|
||||
"pidTuningButtonSave": {
|
||||
"message": "Save"
|
||||
},
|
||||
|
|
|
@ -69,7 +69,8 @@ var RC_tuning = {
|
|||
yaw_rate: 0,
|
||||
dynamic_THR_PID: 0,
|
||||
throttle_MID: 0,
|
||||
throttle_EXPO: 0
|
||||
throttle_EXPO: 0,
|
||||
dynamic_THR_breakpoint: 0
|
||||
};
|
||||
|
||||
var AUX_CONFIG = [];
|
||||
|
|
|
@ -295,6 +295,7 @@ var MSP = {
|
|||
RC_tuning.dynamic_THR_PID = parseFloat((data.getUint8(4) / 100).toFixed(2));
|
||||
RC_tuning.throttle_MID = parseFloat((data.getUint8(5) / 100).toFixed(2));
|
||||
RC_tuning.throttle_EXPO = parseFloat((data.getUint8(6) / 100).toFixed(2));
|
||||
RC_tuning.dynamic_THR_breakpoint = parseInt(data.getUint16(7, 1));
|
||||
break;
|
||||
case MSP_codes.MSP_PID:
|
||||
// PID data arrived, we need to scale it and save to appropriate bank / array
|
||||
|
@ -917,6 +918,8 @@ MSP.crunch = function (code) {
|
|||
buffer.push(parseInt(RC_tuning.dynamic_THR_PID * 100));
|
||||
buffer.push(parseInt(RC_tuning.throttle_MID * 100));
|
||||
buffer.push(parseInt(RC_tuning.throttle_EXPO * 100));
|
||||
buffer.push(lowByte(RC_tuning.dynamic_THR_breakpoint));
|
||||
buffer.push(highByte(RC_tuning.dynamic_THR_breakpoint));
|
||||
break;
|
||||
// Disabled, cleanflight does not use MSP_SET_BOX.
|
||||
/*
|
||||
|
|
|
@ -90,6 +90,11 @@
|
|||
float: right;
|
||||
width: calc(40% - 10px); /* - ( "virtual" margin) */
|
||||
}
|
||||
.tab-pid_tuning .rate-tpa .tpa{
|
||||
float: right;
|
||||
border: 1px solid #ADDFAC; /*THEME CHANGE HERE*/
|
||||
width: calc(100% - 10px); /* - ( "virtual" margin) */
|
||||
}
|
||||
.tab-pid_tuning .buttons {
|
||||
width: calc(100% - 20px);
|
||||
|
||||
|
@ -118,4 +123,4 @@
|
|||
.tab-pid_tuning .update:hover,
|
||||
.tab-pid_tuning .refresh:hover {
|
||||
background-color: #dedcdc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="clear-both"></div>
|
||||
|
||||
<form name="pid-tuning" id="pid-tuning">
|
||||
<table class="pid_tuning">
|
||||
<tr>
|
||||
|
@ -84,15 +83,16 @@
|
|||
<th i18n="pidTuningRollPitchRate"></th>
|
||||
<th i18n="pidTuningYawRate"></th>
|
||||
<th i18n="pidTuningTPA"></th>
|
||||
<th i18n="pidTuningTPABreakPoint" class="tpa"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="number" name="roll-pitch" step="0.01" min="0" max="2.55"/></td>
|
||||
<td><input type="number" name="yaw" step="0.01" min="0" max="2.55"/></td>
|
||||
<td><input type="number" name="tpa" step="0.01" min="0" max="2.55"/></td>
|
||||
<td><input type="number" name="tpa-breakpoint" step="10" min="1000" max="2000" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div class="clear-both"></div>
|
||||
<div class="profile">
|
||||
<span class="head" i18n="pidTuningProfileHead"></span>
|
||||
|
@ -106,4 +106,4 @@
|
|||
<a class="update" href="#" i18n="pidTuningButtonSave"></a>
|
||||
<a class="refresh" href="#" i18n="pidTuningButtonRefresh"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -175,6 +175,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
$('.rate-tpa input[name="roll-pitch"]').val(RC_tuning.roll_pitch_rate.toFixed(2));
|
||||
$('.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);
|
||||
}
|
||||
|
||||
function form_to_pid_and_rc() {
|
||||
|
@ -233,6 +234,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
RC_tuning.roll_pitch_rate = parseFloat($('.rate-tpa input[name="roll-pitch"]').val());
|
||||
RC_tuning.yaw_rate = parseFloat($('.rate-tpa input[name="yaw"]').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());
|
||||
}
|
||||
|
||||
function process_html() {
|
||||
|
@ -357,4 +359,4 @@ TABS.pid_tuning.cleanup = function (callback) {
|
|||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue