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 N5110 ShiftReg PinDetect
Diff: MainMenu.cpp
- Revision:
- 19:89c3eeb3761b
- Parent:
- 18:709ea375b0df
--- a/MainMenu.cpp Mon May 11 04:40:23 2015 +0000
+++ b/MainMenu.cpp Thu Mar 25 03:43:10 2021 +0000
@@ -34,12 +34,18 @@
currentState = MENU_FSM[currentState][2];
}
+void MainMenu::btnDPress()
+{
+ currentState = MENU_FSM[currentState][2];
+}
+
void MainMenu::init()
{
MainMenu::currentState = SELECT_PLAY;
input->addBtnPressInterrupt(Input::ButtonA, &btnAPress);
input->addBtnPressInterrupt(Input::ButtonB, &btnBPress);
input->addBtnPressInterrupt(Input::ButtonC, &btnCPress);
+ input->addBtnPressInterrupt(Input::ButtonD, &btnDPress);
}
void MainMenu::update(float dt) {} // Does not do anything as program flow is controlled by interrupts, but needs to be defined as it is a virtual function.