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
updater.h@0:a6a169de725f, 2013-05-27 (annotated)
- Committer:
- shimniok
- Date:
- Mon May 27 13:26:03 2013 +0000
- Revision:
- 0:a6a169de725f
- Child:
- 15:01fb4916a5cd
Working version with priorities set and update time display
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimniok | 0:a6a169de725f | 1 | #ifndef __SCHEDULER_H |
shimniok | 0:a6a169de725f | 2 | #define __SCHEDULER_H |
shimniok | 0:a6a169de725f | 3 | |
shimniok | 0:a6a169de725f | 4 | /** Updater is the main real time sensor update, estimation, and control routine that is |
shimniok | 0:a6a169de725f | 5 | * called at 100Hz by a timer interrupt |
shimniok | 0:a6a169de725f | 6 | */ |
shimniok | 0:a6a169de725f | 7 | |
shimniok | 0:a6a169de725f | 8 | /** attach the update routine to Ticker interrupt */ |
shimniok | 0:a6a169de725f | 9 | void startUpdater(void); |
shimniok | 0:a6a169de725f | 10 | |
shimniok | 0:a6a169de725f | 11 | /** Returns the elapsed time taken by the updater routine on its most recent run */ |
shimniok | 0:a6a169de725f | 12 | int getUpdateTime(void); |
shimniok | 0:a6a169de725f | 13 | |
shimniok | 0:a6a169de725f | 14 | /** Indicates to the updater that the vehicle should begin its run */ |
shimniok | 0:a6a169de725f | 15 | void beginRun(void); |
shimniok | 0:a6a169de725f | 16 | |
shimniok | 0:a6a169de725f | 17 | /** Indicates to the updater that the vehicle should abort its run */ |
shimniok | 0:a6a169de725f | 18 | void endRun(void); |
shimniok | 0:a6a169de725f | 19 | |
shimniok | 0:a6a169de725f | 20 | /** Tells the updater to re-initialize the navigation state */ |
shimniok | 0:a6a169de725f | 21 | void restartNav(void); |
shimniok | 0:a6a169de725f | 22 | |
shimniok | 0:a6a169de725f | 23 | /** The function that is called at 100Hz. It reads sensors, performs estimation, and controls the robot */ |
shimniok | 0:a6a169de725f | 24 | void update(void); |
shimniok | 0:a6a169de725f | 25 | |
shimniok | 0:a6a169de725f | 26 | #endif |