I messed up the merge, so pushing it over to another repo so I don't lose it. Will tidy up and remove later

Dependencies:   BufferedSerial FatFileSystemCpp mbed

Revision:
9:7214e3c3e5f8
Child:
84:8094a1e64ecf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/frameclock.h	Thu Feb 18 18:15:48 2021 +0000
@@ -0,0 +1,47 @@
+#ifndef __frameclock_h__
+#define __frameclock_h__
+
+#include "LTCApp.h"
+
+class frameclock
+{
+public:
+    frameclock();
+    frameclock(int hour, int minute, int second, int frame, int rate, bool drop);
+
+    void setMode(int rate, bool drop);
+    void setTime(int hour, int minute, int second, int frame);
+
+    inline void getTime(int *hour, int *minute, int *second, int *frame)
+    {
+        *hour = _hour;
+        *minute = _minute;
+        *second = _second;
+        *frame = _frame;
+    }
+
+    uint32_t getTimeMS() {
+       return (_hour*3600+_minute*60+_second)*1000 + (1000*_frame)/_rate;
+    }
+
+    void nextFrame();
+    inline int hours(){return _hour;}
+    inline int minutes(){return _minute;}
+    inline int seconds(){return _second;}
+    inline int frame() {return _frame;}
+
+private:
+
+    int _hour;
+    int _minute;
+    int _second;
+    int _frame;
+    int _rate;
+    bool _drop;
+
+
+};
+
+
+
+#endif