From ed0b879cfc6abb8a22e3dd9cd1a8c087a1541d0b Mon Sep 17 00:00:00 2001 From: Miguel Angel Mulero Martinez Date: Tue, 22 Sep 2020 15:37:13 +0200 Subject: [PATCH] Show the limit in motors graph --- js/flightlog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/flightlog.js b/js/flightlog.js index 7d3c3887..2fbc6775 100644 --- a/js/flightlog.js +++ b/js/flightlog.js @@ -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) {