diff --git a/ykimura0726/PidGain.cpp b/ykimura0726/PidGain.cpp new file mode 100644 index 0000000..bcf4b8c --- /dev/null +++ b/ykimura0726/PidGain.cpp @@ -0,0 +1,12 @@ +#include "PidGain.h" + +PidGain::PidGain(double _kp, double _ki, double _kd) : kp(_kp), ki(_ki), kd(_kd) +{ +} + +void PidGain::setPidGain(double _kp, double _ki, double _kd) +{ + kp = _kp; + ki = _ki; + kd = _kd; +} diff --git a/ykimura0726/PidGain.h b/ykimura0726/PidGain.h new file mode 100644 index 0000000..994d387 --- /dev/null +++ b/ykimura0726/PidGain.h @@ -0,0 +1,15 @@ +#ifndef PID_GAIN_H +#define PID_GAIN_H + +class PidGain +{ +public: + double kp; + double ki; + double kd; + + PidGain(double _kp, double _ki, double _kd); + void setPidGain(double _kp = 0.6, double _ki = 0.08, double _kd = 0.04); +}; + +#endif