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
- Committer:
 - Kerneels Bezuidenhout 
 - Date:
 - 2016-10-03
 - Revision:
 - 34:0b308a399f72
 - Parent:
 - 33:a14bcc3a093f
 - Child:
 - 35:6baa558d3b86
 
File content as of revision 34:0b308a399f72:
#include "CalibrateScreen.hpp"
CalibrateScreen::CalibrateScreen(int *nextScreen, float (*t)[2], int *ballOnPlate ) :
  Screen(),
  _lbTitle( SCREEN_W/2, 0, "Calibrate", Label::CENTER, Font24),
  _btBack( 0, SCREEN_H-30, 100, 30, "Back"),
  _lbMessage( SCREEN_W/2, SCREEN_H/2-10, "Please remove ball from plate", Label::CENTER, Font20)
{
  _nextScreen = nextScreen;
  _t = t;
  _ballOnPlate = ballOnPlate;
}
void CalibrateScreen::Draw()
{
  Clear();
  _lbTitle.Draw();
  _btBack.Draw();
  if( *_ballOnPlate )
      _lbMessage.Draw();
  else
      _lbTitle.Draw("Press and hold location 1")
}
void CalibrateScreen::Process()
{
  if( _btBack.Touched() )
   *_nextScreen = MAIN_SETTINGS_SCREEN;
}