ELEC2645 (2019/20) / Mbed 2 deprecated el18loc_final

Dependencies:   mbed

Committer:
lukeocarwright
Date:
Tue May 05 16:46:01 2020 +0000
Revision:
8:f305ea78b2b1
Child:
13:27300c533dd1
Added Sliders to Faders ready for GUI.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lukeocarwright 8:f305ea78b2b1 1 #ifndef MENU_H
lukeocarwright 8:f305ea78b2b1 2 #define MENU_H
lukeocarwright 8:f305ea78b2b1 3
lukeocarwright 8:f305ea78b2b1 4 #include "mbed.h"
lukeocarwright 8:f305ea78b2b1 5 #include "N5110.h"
lukeocarwright 8:f305ea78b2b1 6 #include "Gamepad.h"
lukeocarwright 8:f305ea78b2b1 7 #include "Front.h"
lukeocarwright 8:f305ea78b2b1 8
lukeocarwright 8:f305ea78b2b1 9 /** Menu class
lukeocarwright 8:f305ea78b2b1 10 * @author Luke Cartwright, University of Leeds
lukeocarwright 8:f305ea78b2b1 11 * @brief manages all menu selection and movement
lukeocarwright 8:f305ea78b2b1 12 * @date May 2020
lukeocarwright 8:f305ea78b2b1 13 */
lukeocarwright 8:f305ea78b2b1 14
lukeocarwright 8:f305ea78b2b1 15 class Menu
lukeocarwright 8:f305ea78b2b1 16 {
lukeocarwright 8:f305ea78b2b1 17 public://-----------------------------------------------------------------------
lukeocarwright 8:f305ea78b2b1 18 //variables
lukeocarwright 8:f305ea78b2b1 19
lukeocarwright 8:f305ea78b2b1 20 //methods
lukeocarwright 8:f305ea78b2b1 21 //constructor
lukeocarwright 8:f305ea78b2b1 22 Menu();
lukeocarwright 8:f305ea78b2b1 23
lukeocarwright 8:f305ea78b2b1 24 //destructior
lukeocarwright 8:f305ea78b2b1 25 ~Menu();
lukeocarwright 8:f305ea78b2b1 26
lukeocarwright 8:f305ea78b2b1 27 //runs main menu code
lukeocarwright 8:f305ea78b2b1 28 void mainmenu(N5110 &lcd, Gamepad &pad);
lukeocarwright 8:f305ea78b2b1 29
lukeocarwright 8:f305ea78b2b1 30 //sub menus
lukeocarwright 8:f305ea78b2b1 31 void subwaveforms(N5110 &lcd, Gamepad &pad, int submenu);
lukeocarwright 8:f305ea78b2b1 32 void subinstructions(N5110 &lcd, Gamepad &pad);
lukeocarwright 8:f305ea78b2b1 33 void subcredits(N5110 &lcd, Gamepad &pad);
lukeocarwright 8:f305ea78b2b1 34 int scroll(N5110 &lcd, Gamepad &pad);
lukeocarwright 8:f305ea78b2b1 35
lukeocarwright 8:f305ea78b2b1 36 private: //---------------------------------------------------------------------
lukeocarwright 8:f305ea78b2b1 37 //variables
lukeocarwright 8:f305ea78b2b1 38 int menuflag;
lukeocarwright 8:f305ea78b2b1 39 int g_selecty;
lukeocarwright 8:f305ea78b2b1 40 int submenu;
lukeocarwright 8:f305ea78b2b1 41 int menusize;
lukeocarwright 8:f305ea78b2b1 42 enum d;
lukeocarwright 8:f305ea78b2b1 43 int s;
lukeocarwright 8:f305ea78b2b1 44
lukeocarwright 8:f305ea78b2b1 45
lukeocarwright 8:f305ea78b2b1 46 //Methods
lukeocarwright 8:f305ea78b2b1 47 void printmainmenu(N5110 &lcd); //prints menu
lukeocarwright 8:f305ea78b2b1 48 void printsubwaveforms(N5110 &lcd); //prints subwaveforms menu
lukeocarwright 8:f305ea78b2b1 49 void subunavailiable(N5110 &lcd); //prints error for sub
lukeocarwright 8:f305ea78b2b1 50 int scroll_check(Gamepad &pad);
lukeocarwright 8:f305ea78b2b1 51
lukeocarwright 8:f305ea78b2b1 52
lukeocarwright 8:f305ea78b2b1 53
lukeocarwright 8:f305ea78b2b1 54
lukeocarwright 8:f305ea78b2b1 55 };
lukeocarwright 8:f305ea78b2b1 56
lukeocarwright 8:f305ea78b2b1 57 #endif