diff include/ClockSync.h @ 149:134bff10e561 ClockSync

Added simple one-variable one-measurement Kalman filter, Pid controller(which output is not used). Virtual clock is now much more precise and reactive for period. Still it is lagging behind a bit on the overall offset.
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 21 Sep 2015 03:12:21 +0100
parents 55c1e591cb2e
children 8f98b32d0e23
line wrap: on
line diff
--- a/include/ClockSync.h	Mon Sep 21 03:11:32 2015 +0100
+++ b/include/ClockSync.h	Mon Sep 21 03:12:21 2015 +0100
@@ -5,6 +5,7 @@
 #include "UdpClient.h"
 #include "Clock.h"
 #include "VirtualClock.h"
+#include "Pid.h"
 #ifdef USE_JUCE
 #else
 #include <I2c_Codec.h>
@@ -51,6 +52,7 @@
 	void resetTs();
 	bool areTsValid();
 	void processOffset(double offset);
+	Pid pid;
 public:
 	ClockSync(){};
 	ClockSync(bool thisIsSlave, int aPort, VirtualClock &aVirtualClock);