David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: logger.cpp
- Revision:
- 48:c84b7b3ab0e8
- Parent:
- 47:cb5c1504c24d
- Child:
- 49:eaa6fd514f4f
--- a/logger.cpp Wed Apr 15 21:19:52 2015 +0000 +++ b/logger.cpp Wed Apr 15 21:42:52 2015 +0000 @@ -14,7 +14,7 @@ return entryIndex >= LOGGER_SIZE; } -void Logger::log() +void Logger::log(struct LogEntry * newEntry) { if (isFull()) { @@ -23,10 +23,7 @@ LogEntry * entry = &entries[entryIndex]; entryIndex++; - - entry->turnAngle = 0; - entry->x = reckoner.x >> 16; - entry->y = reckoner.y >> 16; + *entry = *newEntry; } void Logger::dump()