mirror of
https://github.com/WallabyLester/RBF-aPID-Controller.git
synced 2026-05-10 13:09:12 +08:00
17 lines
319 B
C++
17 lines
319 B
C++
#ifndef APID_CONTROLLER_H
|
|
#define APID_CONTROLLER_H
|
|
|
|
class aPIDController {
|
|
public:
|
|
aPIDController(double kp, double ki, double kd, double dt);
|
|
|
|
double update(double target, double measured_value);
|
|
|
|
private:
|
|
double Kp, Ki, Kd, dt;
|
|
double integral;
|
|
double prev_err;
|
|
};
|
|
|
|
#endif // APID_CONTROLLER_H
|