mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 10:40:36 +08:00
mtecs: BlockPDLimited: make sure dt > 0
This commit is contained in:
@@ -193,7 +193,7 @@ public:
|
||||
virtual ~BlockPDLimited() {};
|
||||
float update(float input) {
|
||||
float difference = 0.0f;
|
||||
float output = getKP() * input + getKD() * getDerivative().update(input);
|
||||
float output = getKP() * input + (getDerivative().getDt() > 0.0f ? getKD() * getDerivative().update(input) : 0.0f);
|
||||
getOutputLimiter().limit(output, difference);
|
||||
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user