lfp filters work
parent
0274e27b7c
commit
594c74de0a
|
@ -1423,9 +1423,9 @@ MSP.crunch = function (code) {
|
||||||
buffer.push(highByte(PID_ADVANCED_CONFIG.motor_pwm_rate));
|
buffer.push(highByte(PID_ADVANCED_CONFIG.motor_pwm_rate));
|
||||||
break;
|
break;
|
||||||
case MSP_codes.MSP_SET_FILTER_CONFIG:
|
case MSP_codes.MSP_SET_FILTER_CONFIG:
|
||||||
buffer.push(FILTER_CONFIG.gyro_soft_lpf_hz);
|
buffer.push8(FILTER_CONFIG.gyro_soft_lpf_hz)
|
||||||
buffer.push(FILTER_CONFIG.dterm_lpf_hz);
|
.push16(FILTER_CONFIG.dterm_lpf_hz)
|
||||||
buffer.push(FILTER_CONFIG.yaw_lpf_hz);
|
.push16(FILTER_CONFIG.yaw_lpf_hz);
|
||||||
break;
|
break;
|
||||||
case MSP_codes.MSP_SET_ADVANCED_TUNING:
|
case MSP_codes.MSP_SET_ADVANCED_TUNING:
|
||||||
buffer.push16(ADVANCED_TUNING.rollPitchItermIgnoreRate)
|
buffer.push16(ADVANCED_TUNING.rollPitchItermIgnoreRate)
|
||||||
|
|
|
@ -289,6 +289,16 @@
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fancy.header {
|
||||||
|
background-color: #D6D6D6;
|
||||||
|
padding-top: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
color: #828282;
|
||||||
|
/* font-family: 'open_sans', Arial; */
|
||||||
|
background-image: linear-gradient(-45deg, rgba(255, 255, 255, .2) 10%, transparent 10%, transparent 20%, rgba(255, 255, 255, .2) 20%, rgba(255, 255, 255, .2) 30%, transparent 30%, transparent 40%, rgba(255, 255, 255, .2) 40%, rgba(255, 255, 255, .2) 50%, transparent 50%, transparent 60%, rgba(255, 255, 255, .2) 60%, rgba(255, 255, 255, .2) 70%, transparent 70%, transparent 80%, rgba(255, 255, 255, .2) 80%, rgba(255, 255, 255, .2) 90%, transparent 90%, transparent 100%, rgba(255, 255, 255, .2) 100%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
.pid_mode {
|
.pid_mode {
|
||||||
width: calc(100% - 5px);
|
width: calc(100% - 5px);
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
|
|
@ -156,6 +156,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gui_box grey topspacer">
|
<div class="gui_box grey topspacer">
|
||||||
<table id="pid_accel" class="pid_tuning">
|
<table id="pid_accel" class="pid_tuning">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -180,7 +181,25 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="gui_box grey topspacer">
|
||||||
|
<table class="pid_filter" class="pid_tuning">
|
||||||
|
<tr class="fancy header">
|
||||||
|
<th>LFP Filters (Hz)</th>
|
||||||
|
<th>Gyro Soft</th>
|
||||||
|
<th>D Term</th>
|
||||||
|
<th>Yaw</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><input type="number" class="gyro" step="1" min="0" max="255" /></td>
|
||||||
|
<td><input type="number" class="dterm" step="1" min="0" max="500" /></td>
|
||||||
|
<td><input type="number" class="yaw" step="1" min="0" max="500" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="cf_column third_right">
|
<div class="cf_column third_right">
|
||||||
<div class="spacer_left">
|
<div class="spacer_left">
|
||||||
<table class="rc_curve cf">
|
<table class="rc_curve cf">
|
||||||
|
|
|
@ -182,9 +182,9 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
$('.pid_tuning input[name="rc_expo"]').attr("rowspan", "3");
|
$('.pid_tuning input[name="rc_expo"]').attr("rowspan", "3");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.pid_tuning input[name="gyro_soft_lpf"]').val(FILTER_CONFIG.gyro_soft_lpf_hz);
|
$('.pid_filter .gyro').val(FILTER_CONFIG.gyro_soft_lpf_hz);
|
||||||
$('.pid_tuning input[name="dterm_lpf"]').val(FILTER_CONFIG.dterm_lpf_hz);
|
$('.pid_filter .dterm').val(FILTER_CONFIG.dterm_lpf_hz);
|
||||||
$('.pid_tuning input[name="yaw_lpf"]').val(FILTER_CONFIG.yaw_lpf_hz);
|
$('.pid_filter .yaw').val(FILTER_CONFIG.yaw_lpf_hz);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,9 +252,9 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
RC_tuning.dynamic_THR_PID = parseFloat($('.tpa input[name="tpa"]').val());
|
RC_tuning.dynamic_THR_PID = parseFloat($('.tpa input[name="tpa"]').val());
|
||||||
RC_tuning.dynamic_THR_breakpoint = parseInt($('.tpa input[name="tpa-breakpoint"]').val());
|
RC_tuning.dynamic_THR_breakpoint = parseInt($('.tpa input[name="tpa-breakpoint"]').val());
|
||||||
FILTER_CONFIG.gyro_soft_lpf_hz = parseInt($('.tpa input[name="gyro_soft_lpf"]').val());
|
FILTER_CONFIG.gyro_soft_lpf_hz = parseInt($('.pid_filter .gyro').val());
|
||||||
FILTER_CONFIG.dterm_lpf_hz = parseInt($('.tpa input[name="dterm_lpf"]').val());
|
FILTER_CONFIG.dterm_lpf_hz = parseInt($('.pid_filter .dterm').val());
|
||||||
FILTER_CONFIG.yaw_lpf_hz = parseInt($('.tpa input[name="yaw_lpf"]').val());
|
FILTER_CONFIG.yaw_lpf_hz = parseInt($('.pid_filter .yaw').val());
|
||||||
}
|
}
|
||||||
function hideUnusedPids(sensors_detected) {
|
function hideUnusedPids(sensors_detected) {
|
||||||
$('.tab-pid_tuning table.pid_tuning').hide();
|
$('.tab-pid_tuning table.pid_tuning').hide();
|
||||||
|
|
Loading…
Reference in New Issue