Skip to content

Commit fb2268d

Browse files
committed
Merge pull request #308 from McGiverGim/fix_ratelimits_maxcurve
Fix max curve when rate_limit not defined
1 parent ae6ce3b commit fb2268d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/flightlog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ FlightLog.prototype.rcCommandRawToDegreesPerSecond = function(value, axis, curre
10271027
*/
10281028

10291029
var limit = sysConfig["rate_limits"][axis];
1030-
if (sysConfig.pidController == 0 /* LEGACY */) {
1030+
if (sysConfig.pidController == 0 || limit == null) { /* LEGACY */
10311031
return constrain(angleRate * 4.1, -8190.0, 8190.0) >> 2; // Rate limit protection
10321032
} else {
10331033
return constrain(angleRate, -1.0 * limit, limit); // Rate limit protection (deg/sec)

0 commit comments

Comments
 (0)