David's line following code from the LVBots competition, 2015.

Dependencies:   GeneralDebouncer Pacer PololuEncoder mbed

Fork of DeadReckoning by David Grayson

logger.h

Committer:
DavidEGrayson
Date:
2015-04-15
Revision:
46:f11cb4f93aac
Parent:
37:23000a47ed2b
Child:
48:c84b7b3ab0e8

File content as of revision 46:f11cb4f93aac:

#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();
    void dump();
    bool isFull();
    
    LogEntry entries[LOGGER_SIZE];
    
    // The index of the next entry to write to.
    int32_t entryIndex;
};