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.
Dependencies: BSP_DISCO_F746NG F746_GUI LCD_DISCO_F746NG SDFileSystem TS_DISCO_F746NG ResistiveTouchController Map CYS8218Controller MedianFilter
Screens/CalibrateScreen.cpp@32:d490f8ca6d2a, 2016-10-03 (annotated)
- Committer:
- Kerneels Bezuidenhout
- Date:
- Mon Oct 03 15:55:55 2016 +0200
- Revision:
- 32:d490f8ca6d2a
- Child:
- 33:a14bcc3a093f
Added CalibrationScreen
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 1 | #include "CalibrateScreen.hpp" |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 2 | |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 3 | CalibrateScreen::CalibrateScreen(int *nextScreen, float (*t)[3] ) : |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 4 | Screen(), |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 5 | _lbTitle( SCREEN_W/2, 0, "Calibrate", Label::CENTER, Font24), |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 6 | _btBack( 0, SCREEN_H-30, 100, 30, "Back"), |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 7 | _lbMessage( SCREEN_W/2, SCREEN_H/2-10, "Please remove ball from plate", Label::CENTER, Font20) |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 8 | { |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 9 | _nextScreen = nextScreen; |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 10 | _t = t; |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 11 | } |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 12 | |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 13 | void CalibrateScreen::Draw() |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 14 | { |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 15 | Clear(); |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 16 | _lbTitle.Draw(); |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 17 | _btBack.Draw(); |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 18 | _lbMessage.Draw(); |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 19 | } |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 20 | |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 21 | void CalibrateScreen::Process() |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 22 | { |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 23 | if( _btBack.Touched() ) |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 24 | *_nextScreen = MAIN_SETTINGS_SCREEN; |
| Kerneels Bezuidenhout |
32:d490f8ca6d2a | 25 | } |