Skip to content

Commit

Permalink
Show the limit in motors graph
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed Sep 22, 2020
1 parent a063ae5 commit ed0b879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/flightlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -1146,8 +1146,9 @@ FlightLog.prototype.rcCommandRawToThrottle = function(value) {
};

FlightLog.prototype.rcMotorRawToPct = function(value) {
const MAX_MOTOR_VALUE = 2047;
// 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);
return (value / MAX_MOTOR_VALUE) * 100;
};

FlightLog.prototype.getPIDPercentage = function(value) {
Expand Down

0 comments on commit ed0b879

Please sign in to comment.