This class encapsulates all the algorithms required for the displaying strings and time dependent patterns on the lcd.
Dependents: 200943412_QuickClick
Display.h
- Committer:
- domkay97
- Date:
- 2017-04-16
- Revision:
- 11:7ad2ea427784
- Parent:
- 9:1e25dcab4927
- Child:
- 12:41e9ba6d65d3
File content as of revision 11:7ad2ea427784:
#ifndef DISPLAY_H #define DISPLAY_H #include "mbed.h" #include "N5110.h" #include "Controller.h" class Display { public: /** Constructor */ Display(); /** Destructor */ ~Display(); /** Sets all variables to zero and resets wait time to max value */ void init(); /** Methord for drawing the circle and decreasing the wait time */ void drawCircle(Controller &ctrl, N5110 &lcd); /** * @brief Displays a random instruction for the user to perform * @param id[in] random number generated from operator * @return void */ void display_instruction(N5110 &lcd, int ran); /** Methord for the mathematical operation behind the change in time before gameover */ void calculateWait(); private: /** @brief Methord allowing one octant to be displayed at one time. Also allows interaction with controller for flashing screen and sounds @param id[in] void @return interger used in for loop (representing nember of loops) */ void Circle(Controller &ctrl, N5110 &lcd); /** * @brief An algorithm that draws the eight octants of a circle pixel by pixel * @param id[in] interger used in for loop from Circle() Methord * @return void */ void Drawarc(N5110 &lcd, int a); int _h; // <<number of arcs displayed float _w; // <<wait time int _a; // <<for loop variable int _v; // <<interger to tell class which random instuction to perform int x; // <<radius of circle int y; // <<y co-ordinate int x0; // <<variable used to modify x int y0; // <<variable used to modify y int radiusMod; // <<1 - the radius of the circle }; #endif