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/AutomaticMoreScreen.cpp
- Committer:
- Kerneels Bezuidenhout
- Date:
- 2016-10-19
- Revision:
- 61:d16e5ad857ba
- Parent:
- 55:d1a00f344351
- Child:
- 62:58e846621435
File content as of revision 61:d16e5ad857ba:
#include "AutomaticMoreScreen.hpp"
AutomaticMoreScreen::AutomaticMoreScreen(int *nextScreen) :
Screen(),
_lbTitle( SCREEN_W/2, 0, "More", Label::CENTER, Font24),
_btBack(0,SCREEN_H-30,100,30,"Back"),
_btManualSP(0, 27, SCREEN_W/2-5, SCREEN_H-35-27, "Manual Tracking"),
_btSquare(SCREEN_W/2+5,27, SCREEN_W/2-5, SCREEN_H-35-27, "Square")
{
_nextScreen = nextScreen;
}
void AutomaticMoreScreen::Draw()
{
Clear();
_lbTitle.Draw();
_btBack.Draw();
_btManualSP.Draw();
_btSquare.Draw();
}
void AutomaticMoreScreen::Process()
{
if( _btBack.Touched() )
*_nextScreen = AUTOMATIC_CONTROL_SCREEN;
if( _btManualSP.Touched() )
{
*_nextScreen = MANUAL_SETPOINT_SCREEN;
}
if( _btSquare.Touched() )
{
*_nextScreen = SQUARE_SCREEN;
}
}