David's dead reckoning code for the LVBots competition on March 6th. Uses the mbed LPC1768, DRV8835, QTR-3RC, and two DC motors with encoders.

Dependencies:   PololuEncoder Pacer mbed GeneralDebouncer

Revision:
40:6fa672be85ec
Parent:
37:23000a47ed2b
Child:
48:597738b77f77
--- a/logger.h	Thu Jul 25 02:11:25 2019 +0000
+++ b/logger.h	Thu Jul 25 02:53:34 2019 +0000
@@ -6,8 +6,7 @@
 
 struct LogEntry
 {
-    //int16_t cos;
-    //int16_t sin;
+    int16_t turnAngle;
     int16_t x;
     int16_t y;   
 };
@@ -16,13 +15,13 @@
 {
     public:
     Logger();
-    void log();
+    void log(struct LogEntry *);
     void dump();
     bool isFull();
+    int32_t getSize() { return entryIndex; }
     
     LogEntry entries[LOGGER_SIZE];
     
     // The index of the next entry to write to.
-    int32_t entryIndex;
+    uint32_t entryIndex;
 };
-