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:
22:0dd9c1b5664a
Parent:
9:7214e3c3e5f8
Child:
84:8094a1e64ecf
--- a/frameRates.cpp	Thu Jul 01 10:43:45 2021 +0000
+++ b/frameRates.cpp	Mon Jul 05 15:30:14 2021 +0000
@@ -5,12 +5,12 @@
 const float FrameRates[] = {0,     23.976, 24, 25,    29.97, 30,
                             47.95, 48,     50, 59.94, 60,    10000000
                            };
-const double FramePeriods[] = {1000000,         1000000 / 23.976, 1000000 / 24,
-                               1000000 / 25,    1000000 / 29.97,  1000000 / 30,
-                               1000000 / 47.95, 1000000 / 48,     1000000 / 50,
-                               1000000 / 59.94, 1000000 / 60,     10
-                              };
-const int numberOfRates = 11;
+//const double FramePeriods[] = {1000000,         1000000 / 23.976, 1000000 / 24,
+//                               1000000 / 25,    1000000 / 29.97,  1000000 / 30,
+//                               1000000 / 47.95, 1000000 / 48,     1000000 / 50,
+//                               1000000 / 59.94, 1000000 / 60,     10
+//                              };
+//const int numberOfRates = 11;
 
 
 frameRates::frameRates() {
@@ -73,9 +73,9 @@
     int MinutesSinceLastSync = minutes % 10;
     const int framesPerMinute = 30 * 59 + 28;
 
-    double indicatedTimeSinceLastSync =
-        (MinutesSinceLastSync * framesPerMinute + seconds * 30 + frame) *
-        frameRateInfo::FramePeriods[rateIndex];
+//    double indicatedTimeSinceLastSync =
+//        (MinutesSinceLastSync * framesPerMinute + seconds * 30 + frame) *
+//        frameRateInfo::FramePeriods[rateIndex];
     double framesMismatch =
         (MinutesSinceLastSync * framesPerMinute + seconds * 30) -
         (frameRateInfo::FrameRates[rateIndex] * (MinutesSinceLastSync * 60 + seconds));
@@ -94,8 +94,8 @@
     int MinutesSinceLastSync = minutes % 10;
     const int framesPerMinute = 30 * 59 + 28;
 
-    double indicatedTimeSinceLastSync =
-        (MinutesSinceLastSync * framesPerMinute + seconds * 30 + frame) * _currentPeriod;
+//    double indicatedTimeSinceLastSync =
+//        (MinutesSinceLastSync * framesPerMinute + seconds * 30 + frame) * _currentPeriod;
     double framesMismatch =
         (MinutesSinceLastSync * framesPerMinute + seconds * 30) - (_currentRate * (MinutesSinceLastSync * 60 + seconds));
     double timeErrorAtSecondStart = framesMismatch * _currentPeriod;