Hugo Hu / Mbed 2 deprecated BRAVEHEART

Dependencies:   mbed N5110 ShiftReg PinDetect

Revision:
19:89c3eeb3761b
Parent:
18:709ea375b0df
diff -r 709ea375b0df -r 89c3eeb3761b MainMenu.cpp
--- 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.