Mercurial > hg > beaglert
annotate include/Clock.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 | 53e3c0a3295d |
children |
rev | line source |
---|---|
giuliomoro@135 | 1 #ifndef CLOCK_H_INCLUDED |
giuliomoro@135 | 2 #define CLOCK_H_INCLUDED |
giuliomoro@135 | 3 #include <sys/time.h> |
giuliomoro@135 | 4 #include <stdio.h> |
giuliomoro@135 | 5 |
giuliomoro@138 | 6 #ifdef USE_JUCE |
giuliomoro@138 | 7 #else |
giuliomoro@138 | 8 //#include <BeagleRT.h> |
giuliomoro@138 | 9 #include <native/timer.h> |
giuliomoro@138 | 10 #endif /* USE_JUCE */ |
giuliomoro@138 | 11 |
giuliomoro@135 | 12 typedef long long int myClock_t; |
giuliomoro@135 | 13 |
giuliomoro@135 | 14 namespace Clock |
giuliomoro@135 | 15 { |
giuliomoro@135 | 16 myClock_t getTimeUs(); |
giuliomoro@135 | 17 } |
giuliomoro@138 | 18 #endif /* CLOCK_H_INCLUDED */ |