Mercurial > hg > beaglert
view include/Pid.h @ 150:ebbfb154351a ClockSync
Now leveraging BBB's lock between xenomai clock and audio clock for ultra-accurate, low-latency clocking. CAVEAT: fractions of samples drifts will occurr every time the clock is changed
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 22 Sep 2015 04:09:13 +0100 |
parents | 134bff10e561 |
children | 8f98b32d0e23 |
line wrap: on
line source
/* * Pid.h * * Created on: 14 Sep 2015 * Author: giulio */ #ifndef PID_H_ #define PID_H_ #include <stdio.h> class Pid{ private: float integralError; float pastError; float error; float differentialError; float output; float kp; float ki; float kd; float ts; int idleTimeout; int timeoutCount; void updateIntegralError(); void updateDifferentialError(); public: Pid(); float setError(float anError); void setIdleTimeout(int aIdleTimeout); float getOutput(); }; #endif /* PID_H_ */