2018 HongoMechaTech A

Dependencies:   mbed

Committer:
Komazawa_sun
Date:
Tue Sep 18 03:11:01 2018 +0000
Revision:
0:e83b840a5f86
????????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Komazawa_sun 0:e83b840a5f86 1 #ifndef TIMER_PID_H_
Komazawa_sun 0:e83b840a5f86 2 #define TIMER_PID_H_
Komazawa_sun 0:e83b840a5f86 3
Komazawa_sun 0:e83b840a5f86 4 #include <mbed.h>
Komazawa_sun 0:e83b840a5f86 5 #include "PID_Control.h"
Komazawa_sun 0:e83b840a5f86 6
Komazawa_sun 0:e83b840a5f86 7 class Timer_PID : public PID_Control
Komazawa_sun 0:e83b840a5f86 8 {
Komazawa_sun 0:e83b840a5f86 9 public:
Komazawa_sun 0:e83b840a5f86 10 Timer_PID(double kp = 0, double ki = 0, double kd = 0);
Komazawa_sun 0:e83b840a5f86 11 double PID(double present, double target);
Komazawa_sun 0:e83b840a5f86 12 double read_interval();
Komazawa_sun 0:e83b840a5f86 13 void reset();
Komazawa_sun 0:e83b840a5f86 14 protected:
Komazawa_sun 0:e83b840a5f86 15 Timer timer;
Komazawa_sun 0:e83b840a5f86 16 double interval;
Komazawa_sun 0:e83b840a5f86 17 };
Komazawa_sun 0:e83b840a5f86 18
Komazawa_sun 0:e83b840a5f86 19 #endif