Skip to content

Commit

Permalink
Tidy up new parameters for Betaflight v2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Keeble committed May 10, 2016
1 parent 459343d commit 68fe407
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
13 changes: 2 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,6 @@ <h5 class="modal-title-date"></h5>
<td><input type="number" name="i" step="0.001" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="bf-only">
<td colspan="2">Horizon Sensitivity</td>
<td class="parameter"><input type="number" name="H_sensitivity" title="H_sensitivity" step="1" min="0" max="999" /></td>
</tr>
</table>
</div>
</div>
Expand Down Expand Up @@ -516,12 +512,13 @@ <h5 class="modal-title-date"></h5>
<thead>
<th></th>
<th class="bf-only">Yaw (Hz)</th>
<th class="bf-only">Reset Offset</th>
</thead>
<tbody>
<tr>
<td></td>
<td class="bf-only"><input type="number" name="yaw_lpf_hz" step="0.01" min="0" max="999.00" /></td>

<td class="bf-only"><input type="number" name="iterm_reset_offset" step="1" min="0" max="999" /></td>
</tr>
</tbody>
</table>
Expand All @@ -531,18 +528,12 @@ <h5 class="modal-title-date"></h5>
<th colspan="5">D-Term</th>
</tr>
<tr>
<th class="bf-only">Calculation</th>
<th class="bf-only">Dynamic Threshold</th>
<th class="bf-only">Differentiator</th>
<th>Filter (Hz)</th>
<th class="bf-only">Average Count</th>
</tr>
</thead>
<tbody>
<tr>
<td class="bf-only"><select name='deltaMethod' title="deltaMethod"><!-- list generated here --></select></td>
<td class="bf-only"><input type="number" name="dynamic_dterm_threshold" title="dynamic_dterm_threshold" step="0.01" min="0" max="999.00" /></td>
<td class="bf-only"><select name='dterm_differentiator' title="dterm_differentiator"><!-- list generated here --></select></td>
<td><input type="number" name="dterm_lpf_hz" title="dterm_lpf_hz" step="0.01" min="0" max="999.00" /></td>
<td class="bf-only"><input type="number" name="dterm_average_count" title="dterm_average_count" step="1" min="0" max="12" /></td>
</tr>
Expand Down
5 changes: 3 additions & 2 deletions js/flightlog_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ var FlightLogParser = function(logData) {
dterm_lpf_hz:null, // DTerm Lowpass Filter Hz
dterm_differentiator:null, // DTerm Differentiator
H_sensitivity:null, // Horizon Sensitivity
iterm_reset_offset:null, // I-Term reset offset
deadband:null, // Roll, Pitch Deadband
yaw_deadband:null, // Yaw Deadband
gyro_lpf:null, // Gyro lpf setting.
Expand Down Expand Up @@ -482,8 +483,8 @@ var FlightLogParser = function(logData) {
case "dynamic_pterm": // Betaflight Only
that.sysConfig.dynamic_pterm = parseInt(fieldValue, 10);
break;
case "H_sensitivity": // Betaflight Only
that.sysConfig.H_sensitivity = parseInt(fieldValue, 10);
case "iterm_reset_offset": // Betaflight Only
that.sysConfig.iterm_reset_offset = parseInt(fieldValue, 10);
break;
case "deadband":
that.sysConfig.deadband = parseInt(fieldValue, 10);
Expand Down
7 changes: 2 additions & 5 deletions js/header_dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,12 @@ function HeaderDialog(dialog, onSave) {
setParameter('yaw_p_limit' ,sysConfig.yaw_p_limit,0);
setParameter('yaw_lpf_hz' ,sysConfig.yaw_lpf_hz,2);
setParameter('dterm_average_count' ,sysConfig.dterm_average_count,0);
renderSelect('dynamic_pterm' ,sysConfig.dynamic_pterm, OFF_ON);
setParameter('rollPitchItermResetRate' ,sysConfig.rollPitchItermResetRate,0);
setParameter('yawItermResetRate' ,sysConfig.yawItermResetRate,0);
setParameter('dterm_lpf_hz' ,sysConfig.dterm_lpf_hz,2);
setParameter('dterm_cut_hz' ,sysConfig.dterm_cut_hz,2);
renderSelect('dterm_differentiator' ,sysConfig.dterm_differentiator, DTERM_DIFFERENTIATOR);
renderSelect('deltaMethod' ,sysConfig.deltaMethod, PID_DELTA_TYPE);
renderSelect('dynamic_pterm' ,sysConfig.dynamic_pterm, OFF_ON);
setParameter('dynamic_dterm_threshold' ,sysConfig.dynamic_dterm_threshold,2);
setParameter('H_sensitivity' ,sysConfig.H_sensitivity,2);
setParameter('iterm_reset_offset' ,sysConfig.iterm_reset_offset,0);
setParameter('deadband' ,sysConfig.deadband,0);
setParameter('yaw_deadband' ,sysConfig.yaw_deadband,0);
renderSelect('gyro_lpf' ,sysConfig.gyro_lpf, GYRO_LPF);
Expand Down

0 comments on commit 68fe407

Please sign in to comment.