Racelogic / Mbed 2 deprecated VIPS_LTC_RAW_IMU

Dependencies:   BufferedSerial FatFileSystemCpp mbed

Revision:
10:053bac3e326b
Parent:
9:7214e3c3e5f8
Child:
11:ef7f6591b776
--- a/main.cpp	Thu Feb 18 18:15:48 2021 +0000
+++ b/main.cpp	Fri Feb 19 15:48:59 2021 +0000
@@ -1,9 +1,11 @@
 #include "mbed.h"
 #include "MSCFileSystem.h"
+
+
 #include "LTCApp.h"
 
-#define FSNAME "msc"
-MSCFileSystem msc(FSNAME);
+  MSCFileSystem msc("msc"); 
+//USBHostMSD msd("msc");
 
 const int framesToCount = 300;
 const int MaxTimeErrorUS = 150;
@@ -15,7 +17,7 @@
 FIZReader FIZPort(p9, p10);
 
 DigitalOut logLED(LED1);
-DigitalOut PPS(p12);
+//DigitalOut PPS(p12);
 
 DigitalOut led2(LED2);
 DigitalOut led3(LED3);
@@ -233,11 +235,11 @@
     bool LockToSync = false;
 
     while (true) {
-        if (framesIn == 100) {
+        if (SyncInCount == 100) {
+            LockToSync= true;
             break;
         }
-        if ((SyncInCount == 100) && (framesIn<45)) { // prefer frame input pin, sync may be twice as high for interlaced systems.
-            LockToSync= true;
+        if ((framesIn == 100) && (SyncInCount<45)) { // prefer frame sync 
             break;
         }
     }
@@ -258,6 +260,7 @@
     inputTimer.reset();
     framesIn = 0;
 
+
     while (framesIn < 100);  // wait for 100 frames;
     uint32_t frameTime = inputTimer.read_us()/100;
 
@@ -273,7 +276,7 @@
         bool drop = LTCInput.isFrameDrop();
         LTCInput.getTime(&hour,&minute,&second,&frame);
         movieTime.setMode(framesPerSecond,drop);
-        movieTime.setTime(hour,minute,second,frame);
+        movieTime.setTime(hour,minute,second,frame);  
     } else { // no time code so clock time doesn't matter
         movieTime.setMode(framesPerSecond,false);
     }