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

Committer:
shimniok
Date:
Thu Nov 29 18:08:05 2018 +0000
Revision:
20:1c2067937065
Parent:
0:a6a169de725f
fixed main compile errors; updated Display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimniok 0:a6a169de725f 1 #ifndef __Display_H
shimniok 0:a6a169de725f 2 #define __Display_H
shimniok 0:a6a169de725f 3
shimniok 0:a6a169de725f 4 #include "SystemState.h"
shimniok 0:a6a169de725f 5 #include "SerialGraphicLCD.h"
shimniok 0:a6a169de725f 6 #include "Bargraph.h"
shimniok 0:a6a169de725f 7
shimniok 0:a6a169de725f 8 class Display {
shimniok 0:a6a169de725f 9 public:
shimniok 0:a6a169de725f 10
shimniok 0:a6a169de725f 11 /** create new display instance
shimniok 0:a6a169de725f 12 *
shimniok 0:a6a169de725f 13 */
shimniok 0:a6a169de725f 14 Display(void);
shimniok 0:a6a169de725f 15
shimniok 0:a6a169de725f 16 /** initialize the display
shimniok 0:a6a169de725f 17 *
shimniok 0:a6a169de725f 18 */
shimniok 0:a6a169de725f 19 void init(void);
shimniok 0:a6a169de725f 20
shimniok 0:a6a169de725f 21 /** display a status string
shimniok 0:a6a169de725f 22 * @param st is the status string to display
shimniok 0:a6a169de725f 23 */
shimniok 0:a6a169de725f 24 void status(const char *st);
shimniok 0:a6a169de725f 25
shimniok 0:a6a169de725f 26 /** display a menu item
shimniok 0:a6a169de725f 27 * @param itemName is the itemName to display
shimniok 0:a6a169de725f 28 */
shimniok 0:a6a169de725f 29 void menu(const char *itemName);
shimniok 0:a6a169de725f 30
shimniok 0:a6a169de725f 31 /** display a selected menu item
shimniok 0:a6a169de725f 32 * @param itemName is the itemName to display
shimniok 0:a6a169de725f 33 */
shimniok 0:a6a169de725f 34 void select(const char *itemName);
shimniok 0:a6a169de725f 35
shimniok 0:a6a169de725f 36 /** display gauge at a given position (slot) along the bottom
shimniok 0:a6a169de725f 37 */
shimniok 0:a6a169de725f 38 void gauge(int slot);
shimniok 0:a6a169de725f 39
shimniok 0:a6a169de725f 40 /** updates data on the display */
shimniok 20:1c2067937065 41 void update(SystemState *state);
shimniok 0:a6a169de725f 42
shimniok 0:a6a169de725f 43 /** initializes the update display */
shimniok 0:a6a169de725f 44 void redraw(void);
shimniok 0:a6a169de725f 45
shimniok 0:a6a169de725f 46 SerialGraphicLCD lcd;
shimniok 0:a6a169de725f 47
shimniok 0:a6a169de725f 48 private:
shimniok 0:a6a169de725f 49 Bargraph v;
shimniok 0:a6a169de725f 50 Bargraph a;
shimniok 0:a6a169de725f 51 Bargraph g1;
shimniok 0:a6a169de725f 52 Bargraph g2;
shimniok 0:a6a169de725f 53 };
shimniok 0:a6a169de725f 54
shimniok 20:1c2067937065 55 #endif