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: mbed
Menu/Menu.h@13:27300c533dd1, 2020-05-09 (annotated)
- Committer:
- lukeocarwright
- Date:
- Sat May 09 13:45:23 2020 +0000
- Revision:
- 13:27300c533dd1
- Parent:
- 8:f305ea78b2b1
- Child:
- 14:9cfe0041cc4e
ADSR faders moving
Who changed what in which revision?
User | Revision | Line number | New 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 | 13:27300c533dd1 | 31 | void subwaveforms(N5110 &lcd, Gamepad &pad); |
lukeocarwright | 8:f305ea78b2b1 | 32 | void subinstructions(N5110 &lcd, Gamepad &pad); |
lukeocarwright | 8:f305ea78b2b1 | 33 | void subcredits(N5110 &lcd, Gamepad &pad); |
lukeocarwright | 13:27300c533dd1 | 34 | int scroll(N5110 &lcd, Gamepad &pad, int submenu, int menusize); |
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 |