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
logger.h
- Committer:
- DavidEGrayson
- Date:
- 2019-07-25
- Revision:
- 40:6fa672be85ec
- Parent:
- 37:23000a47ed2b
- Child:
- 48:597738b77f77
File content as of revision 40:6fa672be85ec:
#pragma once #include <stdint.h> #define LOGGER_SIZE 2000 struct LogEntry { int16_t turnAngle; int16_t x; int16_t y; }; class Logger { public: Logger(); 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. uint32_t entryIndex; };