Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.

Dependencies:   mbed Watchdog SDFileSystem DigoleSerialDisp

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Display.h Source File

Display.h

00001 #ifndef __Display_H
00002 #define __Display_H
00003 
00004 #include "SystemState.h"
00005 #include "SerialGraphicLCD.h"
00006 #include "Bargraph.h"
00007 
00008 class Display {
00009 public:
00010 
00011     /** create new display instance
00012      *
00013      */
00014     Display(void);
00015 
00016     /** initialize the display
00017      *
00018      */
00019     void init(void);
00020 
00021     /** display a status string
00022      * @param st is the status string to display
00023      */
00024     void status(const char *st);
00025 
00026     /** display a menu item
00027      * @param itemName is the itemName to display
00028      */
00029     void menu(const char *itemName);
00030 
00031     /** display a selected menu item
00032      * @param itemName is the itemName to display
00033      */
00034     void select(const char *itemName);
00035 
00036     /** display gauge at a given position (slot) along the bottom
00037      */
00038     void gauge(int slot);
00039 
00040     /** updates data on the display */
00041     void update(SystemState *state);
00042     
00043     /** initializes the update display */
00044     void redraw(void);
00045 
00046     SerialGraphicLCD lcd;
00047     
00048 private:
00049     Bargraph v;
00050     Bargraph a;
00051     Bargraph g1;
00052     Bargraph g2;
00053 };        
00054 
00055 #endif