Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic notch max hz to header #457

Merged
merged 1 commit into from
Jul 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,11 @@ <h5 class="modal-title-craft"></h5>
<br>Min (Hz)</label>
<input type="number" step="0.1" min="0" max="999.00" />
</td>
<td name="dyn_notch_max_hz">
<label>Dyn Notch
<br>Max (Hz)</label>
<input type="number" step="0.1" min="0" max="999.00" />
</td>
</tr>

<tr class='dshot_bidir_required'>
Expand Down
4 changes: 3 additions & 1 deletion js/flightlog_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ var FlightLogParser = function(logData) {
dyn_notch_range: null, // Dyn Notch Range (LOW, MED, HIGH or AUTO)
dyn_notch_width_percent: null, // Dyn Notch width percent distance between the two notches
dyn_notch_q: null, // Dyn Notch width of each dynamic filter
dyn_notch_min_hz: null, // Gyn Notch min limit in Hz for the filter
dyn_notch_min_hz: null, // Dyn Notch min limit in Hz for the filter
dyn_notch_max_hz: null, // Dyn Notch max limit in Hz for the filter
rates_type: null,
unknownHeaders : [] // Unknown Extra Headers
},
Expand Down Expand Up @@ -614,6 +615,7 @@ var FlightLogParser = function(logData) {
case "dyn_notch_width_percent":
case "dyn_notch_q":
case "dyn_notch_min_hz":
case "dyn_notch_max_hz":
case "rates_type":
that.sysConfig[fieldName] = parseInt(fieldValue, 10);
break;
Expand Down
4 changes: 3 additions & 1 deletion js/header_dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ function HeaderDialog(dialog, onSave) {
{name:'iterm_relax' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'iterm_relax_type' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'iterm_relax_cutoff' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'dyn_notch_range' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'dyn_notch_range' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'4.1.0'},
{name:'dyn_notch_width_percent' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'dyn_notch_q' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'dyn_notch_min_hz' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
{name:'dyn_notch_max_hz' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.2.0', max:'999.9.9'},
{name:'rates_type' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.2.0', max:'999.9.9'},
];

Expand Down Expand Up @@ -573,6 +574,7 @@ function HeaderDialog(dialog, onSave) {
setParameter('dyn_notch_width_percent' ,sysConfig.dyn_notch_width_percent, 0);
setParameter('dyn_notch_q' ,sysConfig.dyn_notch_q , 0);
setParameter('dyn_notch_min_hz' ,sysConfig.dyn_notch_min_hz , 0);
setParameter('dyn_notch_max_hz' ,sysConfig.dyn_notch_max_hz , 0);

setParameter('gyro_rpm_notch_harmonics', sysConfig.gyro_rpm_notch_harmonics, 0);
setParameter('gyro_rpm_notch_q' , sysConfig.gyro_rpm_notch_q , 0);
Expand Down