Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.

Dependencies:   mbed Watchdog SDFileSystem DigoleSerialDisp

Revision:
3:42f3821c4e54
Parent:
2:fbc6e3cf3ed8
Child:
15:01fb4916a5cd
--- a/logging/logging.cpp	Thu Jun 06 13:40:23 2013 +0000
+++ b/logging/logging.cpp	Fri Jun 07 14:45:46 2013 +0000
@@ -13,6 +13,7 @@
     s->millis = 0;
     s->current = s->voltage = 0.0;
     s->g[0] = s->g[1] = s->g[2] = 0;
+    s->gyro[0] = s->gyro[1] = s->gyro[2] = 0;
     s->gTemp = 0;
     s->a[0] = s->a[1] = s->a[2] = 0;
     s->m[0] = s->m[1] = s->m[2] = 0;
@@ -143,7 +144,7 @@
     printFloat(logp, s.voltage, 2);
     fputc(',',logp);
     for (int q=0; q < 3; q++) {
-        printInt(logp, s.g[q]);
+        printFloat(logp, s.gyro[q], 6);
         fputc(',',logp);
     }
     printInt(logp, s.gTemp);
@@ -208,6 +209,8 @@
     fputc(',',logp);
     printFloat(logp, s.steerAngle, 3);
     fputc(',',logp);
+    printFloat(logp, s.errHeading, 3);
+    fputc(',',logp);
     fputc('\n',logp);
 
     t2 = logtimer.read_us();