Racelogic / Mbed 2 deprecated VIPS_LTC_RAW_IMU

Dependencies:   BufferedSerial FatFileSystemCpp mbed

Revision:
2:a79201e302d7
Parent:
1:dd1f7e162f91
Child:
3:14d241e29be3
--- a/main.cpp	Fri Jan 15 15:44:39 2021 +0000
+++ b/main.cpp	Mon Jan 18 09:15:04 2021 +0000
@@ -66,6 +66,7 @@
     float roll;
     float pitch;
     float yaw;
+    uint8_t accuracy[4];
     uint16_t checksum;
 } __attribute__((packed)) ;
 
@@ -78,7 +79,11 @@
     bytes[1]=0x9d;
     *(uint16_t*)(bytes+2) = sizeof(struct outputFormat_s);
     packetOut.header = *(uint32_t*)bytes;
-    packetOut.mask = 0x04;
+    packetOut.mask = 0x44;
+packetOut.accuracy[0] = 0;
+packetOut.accuracy[1] = 0;
+packetOut.accuracy[2] = 0;
+packetOut.accuracy[3] = 0;
 }
 
 void sendPosition(position *posPtr)
@@ -91,6 +96,7 @@
         packetOut.roll = posPtr->roll;
         packetOut.pitch = posPtr->pitch;
         packetOut.yaw = posPtr->yaw;
+        packetOut.accuracy[3] = posPtr->ID;
         VIPSSerial::getCRC((void *)&packetOut, sizeof(struct outputFormat_s)-2, (void *)&packetOut.checksum);
         COM1.write(&packetOut, sizeof(struct outputFormat_s));
         COM3.write(&packetOut, sizeof(struct outputFormat_s));