Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: extras/EASettings.h
- Revision:
- 4:f8f7f4f9c58d
- Parent:
- 3:24fbf4dbd7e5
--- a/extras/EASettings.h Wed Mar 31 22:22:21 2010 +0000 +++ b/extras/EASettings.h Mon Apr 26 21:37:54 2010 +0000 @@ -11,6 +11,8 @@ class EATouchManager; class EAButton; class EATouch; +class EACompass; +class HMC6352; /** * Class to handle setting up the peripherals on the EA star gazer board. @@ -28,10 +30,11 @@ STATE_DATE_YEAR, STATE_DATE_HOUR, STATE_DATE_MINUTE, - STATE_DATE_SECOND + STATE_DATE_SECOND, + STATE_COMPASS }; - EASettings(EALCD& lcd, EATouch& touch, EATouchManager& manager); + EASettings(EALCD& lcd, EATouch& touch, EATouchManager& manager, HMC6352& compass); ~EASettings(); void start(); @@ -42,11 +45,18 @@ inline EASettings::State state() { return _state; } + void redrawCompass(); + + void tick(); + private: EALCD& _lcd; EATouch& _touch; EATouchManager& _manager; + HMC6352& _compass; + struct tm* _time; + EACompass* _compassCircle; EAButton* _launchBox; EAButton* _returnBox; @@ -57,13 +67,17 @@ EAButton* _prevBox; EAButton* _incBox; EAButton* _decBox; - + EASettings::State _state; void _disableHitBoxs(); void _drawLaunchButton(); void _drawPortal(); + + void _updateCompass(); + void _drawCompass(); + void _drawDate(); EASettings::State _incDate();