From fb2268d4e3b6b764edf59a89fd61ae299f40b4f8 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Fri, 19 Apr 2019 13:51:46 +1200 Subject: [PATCH] Merge pull request #308 from McGiverGim/fix_ratelimits_maxcurve Fix max curve when rate_limit not defined --- js/flightlog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/flightlog.js b/js/flightlog.js index 864e5d66..a18507f9 100644 --- a/js/flightlog.js +++ b/js/flightlog.js @@ -1027,7 +1027,7 @@ FlightLog.prototype.rcCommandRawToDegreesPerSecond = function(value, axis, curre */ var limit = sysConfig["rate_limits"][axis]; - if (sysConfig.pidController == 0 /* LEGACY */) { + if (sysConfig.pidController == 0 || limit == null) { /* LEGACY */ return constrain(angleRate * 4.1, -8190.0, 8190.0) >> 2; // Rate limit protection } else { return constrain(angleRate, -1.0 * limit, limit); // Rate limit protection (deg/sec)