Racelogic / Mbed 2 deprecated VIPS_LTC_RAW_IMU

Dependencies:   BufferedSerial FatFileSystemCpp mbed

Revision:
11:ef7f6591b776
Parent:
10:053bac3e326b
Child:
12:06050debf014
--- a/main.cpp	Fri Feb 19 15:48:59 2021 +0000
+++ b/main.cpp	Fri Feb 19 15:55:25 2021 +0000
@@ -7,29 +7,29 @@
   MSCFileSystem msc("msc"); 
 //USBHostMSD msd("msc");
 
-const int framesToCount = 300;
-const int MaxTimeErrorUS = 150;
-const int timerOverheadTime = 19;
-
 BufferedSerial pc(USBTX, USBRX);
 VIPSSerial VIPS(p28, p27);
 BufferedSerial COM1(p13, p14);
 FIZReader FIZPort(p9, p10);
 
-DigitalOut logLED(LED1);
-//DigitalOut PPS(p12);
-
+DigitalOut led1(LED1);
 DigitalOut led2(LED2);
 DigitalOut led3(LED3);
-
 DigitalOut frameToggle(LED4);
-DigitalOut second(p23);
 
 LTCDecode LTCInput(p7);
 InterruptIn PPFin(p29);
 InterruptIn Syncin(p8);
 
-DigitalIn logButton(p21);
+DigitalIn logButton(p17,PullDown);
+
+DigitalOut logLED(p18); // red
+DigitalOut GreenLED(p19);
+DigitalOut BlueLED(p20);
+
+#define LED_OFF 1
+#define LED_ON 0
+ 
 
 frameclock movieTime;
 
@@ -142,7 +142,7 @@
     COM1.write(&packetOut, sizeof(struct outputFormat_s));
     if (logging) {
         if (!fwrite(&packetOut, sizeof(struct outputFormat_s), 1, logFile)) { // write failed
-            logLED = 0;
+            logLED = LED_OFF;
             logging = false;
             fclose(logFile);
             logFile = NULL;
@@ -304,13 +304,13 @@
             if (logButton) { // pressed
                 logButtonDownTime = inputTimer.read();
                 if (logging) {
-                    logLED = 0;
+                    logLED = LED_OFF;
                     logging=false;
                     fclose(logFile);
                 } else {
                     logFile = nextBinaryFile();
                     if(logFile) {
-                        logLED = 1;
+                        logLED = LED_ON;
                         logging = true;
                     }
                 }