From a0acee95c763246c1fa8c6f9d365fe885208e708 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 May 2023 14:47:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?PidGain=E3=81=AE.h,=20.cppwo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ykimura0726/PidGain.cpp | 12 ++++++++++++ ykimura0726/PidGain.h | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 ykimura0726/PidGain.cpp create mode 100644 ykimura0726/PidGain.h diff --git a/ykimura0726/PidGain.cpp b/ykimura0726/PidGain.cpp new file mode 100644 index 0000000..83caeba --- /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; +} \ No newline at end of file diff --git a/ykimura0726/PidGain.h b/ykimura0726/PidGain.h new file mode 100644 index 0000000..baae0ad --- /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 \ No newline at end of file From d78075e4a4216cfd66f5384052d7759b1fe6dfad Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 May 2023 14:48:10 +0900 Subject: [PATCH 2/2] =?UTF-8?q?PidGain=E3=81=AE.h,=20.cpp=E3=82=92?= =?UTF-8?q?=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ykimura0726/PidGain.cpp | 2 +- ykimura0726/PidGain.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ykimura0726/PidGain.cpp b/ykimura0726/PidGain.cpp index 83caeba..bcf4b8c 100644 --- a/ykimura0726/PidGain.cpp +++ b/ykimura0726/PidGain.cpp @@ -9,4 +9,4 @@ void PidGain::setPidGain(double _kp, double _ki, double _kd) kp = _kp; ki = _ki; kd = _kd; -} \ No newline at end of file +} diff --git a/ykimura0726/PidGain.h b/ykimura0726/PidGain.h index baae0ad..994d387 100644 --- a/ykimura0726/PidGain.h +++ b/ykimura0726/PidGain.h @@ -12,4 +12,4 @@ class PidGain void setPidGain(double _kp = 0.6, double _ki = 0.08, double _kd = 0.04); }; -#endif \ No newline at end of file +#endif