Showing the changes to libraries/shared/src/PIDController.cpp (1 of 263 files). Show all
Unified · Split
| @@ -9,10 +9,13 @@ · 8 unmodified lines | |||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | // | 10 | // |
| 11 | 11 | ||
| 12 | #include "PIDController.h" | ||
| 13 | |||
| 12 | #include <glm/glm.hpp> | 14 | #include <glm/glm.hpp> |
| 15 | |||
| 13 | #include <QDebug> | 16 | #include <QDebug> |
| 17 | |||
| 14 | #include "SharedLogging.h" | 18 | #include "SharedLogging.h" |
| 15 | #include "PIDController.h" | ||
| 16 | 19 | ||
| 17 | float PIDController::update(float measuredValue, float dt, bool resetAccumulator) { | 20 | float PIDController::update(float measuredValue, float dt, bool resetAccumulator) { |
| 18 | const float error = getMeasuredValueSetpoint() - measuredValue; // Sign is the direction we want measuredValue to go. Positive means go higher. | 21 | const float error = getMeasuredValueSetpoint() - measuredValue; // Sign is the direction we want measuredValue to go. Positive means go higher. |