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:
16:4c4b75824efc
Parent:
3:42f3821c4e54
--- a/SystemState.h	Thu Nov 29 17:11:34 2018 +0000
+++ b/SystemState.h	Thu Nov 29 17:13:50 2018 +0000
@@ -1,12 +1,14 @@
 #ifndef _SYSTEMSTATE_H
 #define _SYSTEMSTATE_H
 
-#define SSBUF 0x3F   // 0b0000 0011 1111 1111
+#define SSBUF 32 // must be 2^n
 
 /** System State is the main mechanism for communicating current realtime system state to
  * the rest of the system for logging, data display, etc.
  */
 
+#include <stdbool.h>
+
 /* struct systemState
  * structure containing system sensor data
  ****** System Status
@@ -82,6 +84,20 @@
     float gbias;
     float errHeading;
     float steerAngle;
+    float LABrg;
+    float LAx;
+    float LAy;
 } SystemState;
 
-#endif
\ No newline at end of file
+void state_clear( SystemState *s );
+bool fifo_init(void);
+void fifo_reset(void);
+bool fifo_available(void);
+bool fifo_push(SystemState *s);
+SystemState *fifo_first(void);
+SystemState *fifo_last(void);
+SystemState *fifo_pull(void);
+int fifo_getInState(void);
+int fifo_getOutState(void);
+
+#endif