Skip to content

Commit f73ad7f

Browse files
authored
Merge pull request #439 from IllusionFpv/add-rates_type
Add rates_type to header
2 parents e3580bc + 673102e commit f73ad7f

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,21 @@ <h5 class="modal-title-craft"></h5>
15091509
<div class="spacer_box_title">RC Command and Motor Protocols</div>
15101510
</div>
15111511
<div class="spacer_box">
1512+
<table class="parameter cf">
1513+
<tbody>
1514+
<tr>
1515+
<th colspan="3">Rates Type</th>
1516+
</tr>
1517+
<tr>
1518+
<td name="rates_type" class="bf-only">
1519+
<select>
1520+
<!-- list generated here -->
1521+
</select>
1522+
</td>
1523+
</tr>
1524+
</tbody>
1525+
</table>
1526+
15121527
<table class="parameter cf">
15131528
<tbody>
15141529
<tr>

js/flightlog_fielddefs.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,14 @@ var
435435
"RUNAWAY_TAKEOFF",
436436
"GPS_RESCUE",
437437
"SERIAL_IO",
438+
]),
439+
440+
RATES_TYPE = makeReadOnly([
441+
"BETAFLIGHT",
442+
"RACEFLIGHT",
443+
"KISS",
444+
"ACTUAL",
445+
"QUICK",
438446
]);
439447

440448
function adjustFieldDefsList(firmwareType, firmwareVersion) {

js/flightlog_parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ var FlightLogParser = function(logData) {
303303
dyn_notch_width_percent: null, // Dyn Notch width percent distance between the two notches
304304
dyn_notch_q: null, // Dyn Notch width of each dynamic filter
305305
dyn_notch_min_hz: null, // Gyn Notch min limit in Hz for the filter
306+
rates_type: null,
306307
unknownHeaders : [] // Unknown Extra Headers
307308
},
308309

@@ -613,10 +614,9 @@ var FlightLogParser = function(logData) {
613614
case "dyn_notch_width_percent":
614615
case "dyn_notch_q":
615616
case "dyn_notch_min_hz":
616-
617+
case "rates_type":
617618
that.sysConfig[fieldName] = parseInt(fieldValue, 10);
618619
break;
619-
620620
case "rc_expo":
621621
case "rc_rates":
622622
if(stringHasComma(fieldValue)) {

js/header_dialog.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function HeaderDialog(dialog, onSave) {
9494
{name:'dyn_notch_width_percent' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
9595
{name:'dyn_notch_q' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
9696
{name:'dyn_notch_min_hz' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
97+
{name:'rates_type' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.2.0', max:'999.9.9'},
9798
];
9899

99100
function isParameterValid(name) {
@@ -706,6 +707,8 @@ function HeaderDialog(dialog, onSave) {
706707
$('.parameter td[name="dterm_lpf_dyn_max_hz"]').css('display', 'none');
707708
}
708709

710+
renderSelect('rates_type' , sysConfig.rates_type, RATES_TYPE);
711+
709712
/* Packed Flags */
710713

711714
builtFeaturesList(sysConfig);

0 commit comments

Comments
 (0)