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:
48:c84b7b3ab0e8
Parent:
46:f11cb4f93aac
Child:
52:05a8e919ddb0

File content as of revision 48:c84b7b3ab0e8:

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