PI depth control test
Dependencies: MS5803 mbed Servo
Diff: IMUDepthControl.h
- Revision:
- 1:07e046bbcb84
- Parent:
- 0:df16f9bfc07b
--- a/IMUDepthControl.h Wed Aug 06 20:17:02 2014 +0000 +++ b/IMUDepthControl.h Wed Aug 06 20:33:01 2014 +0000 @@ -1,4 +1,6 @@ #pragma once +#include "mbed.h" +#include "Servo.h" #include "MS5803.h" class IMUDepthControl @@ -9,8 +11,14 @@ float m_Kp; float m_Ki; float m_errorsum; + float m_delta_t; + float m_last_pos; + Timer t; + Servo output; + + Ticker feedback; public: IMUDepthControl(PinName sda, PinName scl, float Kp, float Ki); void setPoint(float setpoint); - float iterate(); + void iterate(); }; \ No newline at end of file