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
Diff: Screens/AutomaticSettingsScreen.cpp
- Revision:
- 22:dd9ff475b34c
- Child:
- 23:bab197887d5e
diff -r aa3074b237e0 -r dd9ff475b34c Screens/AutomaticSettingsScreen.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Screens/AutomaticSettingsScreen.cpp Mon Oct 03 00:31:36 2016 +0200 @@ -0,0 +1,42 @@ +#include "AutomaticSettingsScreen.hpp" + +AutomaticSettingsScreen::AutomaticSettingsScreen() : + Screen(), + _lbTitle( SCREEN_W/2, 0, "Settings", Label::CENTER, Font24), + _btBack( 0, SCREEN_H-30, 100, 30, "Back"), + _nlbP(0,26, "P =%.3f", *P); + _btP(SCREEN_W/2, 26, 100, 30, "Change"), + _nlbI(0,61, "P =%.3f", *I); + _btI(SCREEN_W/2, 61, 100, 30, "Change"), + _nlbD(0,96, "P =%.3f", *D); + _btD(SCREEN_W/2, 96, 100, 30, "Change"), + _nlbTs(0,131, "P =%.3f", *Ts); + _btTs(SCREEN_W/2, , 131, 30, "Change") +{ + _nextScreen = nextScreen; + _P = P; + _I = I; + _D = D; + _Ts = Ts; +} + +void AutomaticSettingsScreen::Draw() +{ + Clear(); + _lbTitle.Draw(); + _btBack.Draw(); + _nlbP.Draw(); + _btP.Draw(); + _nlbI.Draw(); + _btI.Draw(); + _nlbD.Draw(); + _btD.Draw(); + _nlbTs.Draw(); + _btTs.Draw(); +} + +void AutomaticSettingsScreen::Process() +{ + if( _btBack.Touched() ) + *_nextScreen = AUTOMATIC_CONTROL_SCREEN; +}