aaa

Files at this revision

API Documentation at this revision

Comitter:
shatari
Date:
Fri Dec 10 14:02:27 2021 +0000
Parent:
2:0668932f9d5d
Commit message:
a

Changed in this revision

CalPID.cpp Show annotated file Show diff for this revision Revisions of this file
CalPID.h Show annotated file Show diff for this revision Revisions of this file
diff -r 0668932f9d5d -r 634166991b10 CalPID.cpp
--- a/CalPID.cpp	Thu Mar 18 12:29:04 2021 +0000
+++ b/CalPID.cpp	Fri Dec 10 14:02:27 2021 +0000
@@ -39,8 +39,10 @@
 
     deviation_old = devia_present;
 
+    value_PID = present_parameter;
     return value_PID;
 }
+
 double CalPID::calPD(double devia_present)
 {
     double differential = (deviation_old - devia_present) / delta_t;
diff -r 0668932f9d5d -r 634166991b10 CalPID.h
--- a/CalPID.h	Thu Mar 18 12:29:04 2021 +0000
+++ b/CalPID.h	Fri Dec 10 14:02:27 2021 +0000
@@ -12,11 +12,14 @@
     double max_pid;
 
 public:
+    double present_parameter;
+    
     CalPID(double kp_, double ki_, double kd_,double dt, double max);//PIDの係数3つ(PDの場合でもI=0とかにして3つ)制御周期、、最大値
     void setParameter(double kp_, double ki_, double kd_);
     void setMaxValue(double max);
     void setDELTA_T(double delta_time);
     double calPID(double devia_present);
+    double getPresentPID();
     double calPD(double devia_present);
     double calPI_D(double devia_present,double present_value);//微分先行型PID
     double calP_D(double devia_present,double present_value);//微分先行型PD