comparison include/ClockSync.h @ 141:44d07fa9bd03 ClockSync

Ultra-basic feedback for clock sync works^CIssues: response time of the IIR filter is too slow, requires PID and better filtering algorithm.
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 14 Sep 2015 15:42:11 +0100
parents e77e2e712fbc
children 55c1e591cb2e
comparison
equal deleted inserted replaced
140:5edc6d0713ef 141:44d07fa9bd03
41 myClock_t T2p; 41 myClock_t T2p;
42 int receiveLoopSleepUs; 42 int receiveLoopSleepUs;
43 int receiveLoopTimeout; 43 int receiveLoopTimeout;
44 char buffer[kSyncMessageLength]; 44 char buffer[kSyncMessageLength];
45 VirtualClock *virtualClock; 45 VirtualClock *virtualClock;
46 void resetTs();
47 bool areTsValid();
48 void processOffset(double offset);
46 public: 49 public:
47 ClockSync(){}; 50 ClockSync(){};
48 ClockSync(bool thisIsSlave, int aPort, VirtualClock &aVirtualClock); 51 ClockSync(bool thisIsSlave, int aPort, VirtualClock &aVirtualClock);
49 void init(bool thisIsSlave, int aPort, VirtualClock &aVirtualClock); 52 void init(bool thisIsSlave, int aPort, VirtualClock &aVirtualClock);
50 void* getBuffer(); 53 void* getBuffer();