Skip to content
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
14 changes: 10 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1856,10 +1856,6 @@ <h5 class="modal-title-craft"></h5>
<table class="parameter cf">
<tbody>
<tr>
<td name="digitalIdleOffset">
<label>D-Shot Offset (%)</label>
<input type="number" step="0.01" min="0" max="1" />
</td>
<td name="motorOutputLow">
<label>D-Shot Motor Low</label>
<input type="number" step="10" min="0" max="2047" />
Expand All @@ -1869,6 +1865,16 @@ <h5 class="modal-title-craft"></h5>
<input type="number" step="10" min="0" max="2047" />
</td>
</tr>
<tr>
<td name="digitalIdleOffset">
<label>D-Shot Offset (%)</label>
<input type="number" step="0.01" min="0" max="1" />
</td>
<td name="dynamic_idle_min_rpm">
<label>Dynamic Idle Min RPM (* 100)</label>
<input type="number" step="1" min="0" max="100" />
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
4 changes: 2 additions & 2 deletions js/flightlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +1171,9 @@ FlightLog.prototype.rcCommandRawToThrottle = function(value) {
};

FlightLog.prototype.rcMotorRawToPctEffective = function(value) {

// Motor displayed as percentage
return Math.min(Math.max(((value - this.getSysConfig().motorOutput[0]) / (this.getSysConfig().motorOutput[1] - this.getSysConfig().motorOutput[0])) * 100.0, 0.0),100.0);
const minValue = (this.isDigitalProtocol() && this.getSysConfig().dynamic_idle_min_rpm > 0) ? this.getSysConfig().digitalIdleOffset : this.getSysConfig().motorOutput[0];
return Math.min((value - minValue) / (this.getSysConfig().motorOutput[1] - minValue) * 100.0, 100.0);

};

Expand Down
2 changes: 2 additions & 0 deletions js/flightlog_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ var FlightLogParser = function(logData) {
fields_disabled_mask: null,
vbat_sag_compensation: null,
gyro_to_use: null,
dynamic_idle_min_rpm: null,
unknownHeaders : [] // Unknown Extra Headers
},

Expand Down Expand Up @@ -624,6 +625,7 @@ var FlightLogParser = function(logData) {
case "fields_disabled_mask":
case "motor_pwm_protocol":
case "gyro_to_use":
case "dynamic_idle_min_rpm":
that.sysConfig[fieldName] = parseInt(fieldValue, 10);
break;
case "rc_expo":
Expand Down
1 change: 1 addition & 0 deletions js/graph_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ GraphConfig.load = function(config) {

if (!flightLog.isFieldDisabled().MOTORS) {
EXAMPLE_GRAPHS.push({label: "Motors",fields: ["motor[all]", "servo[5]"]});
EXAMPLE_GRAPHS.push({label: "Motors (Legacy)",fields: ["motorLegacy[all]", "servo[5]"]});
}
if (!flightLog.isFieldDisabled().GYRO) {
EXAMPLE_GRAPHS.push({label: "Gyros",fields: ["gyroADC[all]"]});
Expand Down
3 changes: 3 additions & 0 deletions js/header_dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function HeaderDialog(dialog, onSave) {
{name:'fields_disabled_mask' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.3.0', max:'999.9.9'},
{name:'vbat_sag_compensation' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.3.0', max:'999.9.9'},
{name:'gyro_to_use' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.3.0', max:'999.9.9'},
{name:'dynamic_idle_min_rpm' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.3.0', max:'999.9.9'},
];

function isParameterValid(name) {
Expand Down Expand Up @@ -723,6 +724,8 @@ function HeaderDialog(dialog, onSave) {

setParameter('vbat_sag_compensation' ,sysConfig.vbat_sag_compensation,0);

setParameter('dynamic_idle_min_rpm' , sysConfig.dynamic_idle_min_rpm, 0);

// Dynamic filters of Betaflight 4.0
if(activeSysConfig.firmwareType == FIRMWARE_TYPE_BETAFLIGHT && semver.gte(activeSysConfig.firmwareVersion, '4.0.0') &&
(sysConfig.gyro_lowpass_dyn_hz[0] != null) && (sysConfig.gyro_lowpass_dyn_hz[0] > 0) &&
Expand Down