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
Diff: UserInteraction/UX.cpp
- Revision:
- 22:69d7fe739872
- Parent:
- 21:a0904159e183
--- a/UserInteraction/UX.cpp Tue Apr 30 13:17:14 2019 +0000
+++ b/UserInteraction/UX.cpp Tue Apr 30 20:36:42 2019 +0000
@@ -15,6 +15,9 @@
batPad.init();
_button_pressed=false;
}
+void UX::reset(){
+ _button_pressed=false;
+}
int UX::get_a_pressed(){
int _a_pressed=0;
if (batPad.check_event(Gamepad::A_PRESSED) == true){
@@ -30,7 +33,7 @@
}
return _l_pressed;
}
-void UX::first_menu(N5110 &menu_lcd,Gamepad &pad){
+void UX::first_menu(N5110 &menu_lcd){
menu_lcd.clear();
menu_lcd.printString("HERO CRICKET",5,1);
menu_lcd.refresh();
@@ -48,7 +51,7 @@
batPad.leds_off();
wait(0.1);
}
- second_menu(menu_lcd);
+ //second_menu(menu_lcd);
batPad.leds_off();
}
void UX::second_menu(N5110 &menu_lcd){
@@ -58,9 +61,11 @@
_button_pressed=true;
}
if (batPad.check_event(Gamepad::B_PRESSED) == true){
+ printf("HERE1\n");
rules_menu(menu_lcd);
}
if (batPad.check_event(Gamepad::X_PRESSED) == true){
+ printf("WHAT \n");
controls_menu(menu_lcd);
}
@@ -98,7 +103,7 @@
menu_lcd.setContrast(0.5);
menu_lcd.printString("There are 5",0,0);
menu_lcd.printString("fielders in",0,1);
- menu_lcd.printString("the ",0,1);
+ menu_lcd.printString("the outfield ",0,2);
menu_lcd.printString("marked by",0,3);
menu_lcd.printString("white circles",0,4);
menu_lcd.refresh();
@@ -231,17 +236,6 @@
wait(0.5);
menu_lcd.printString("GOOD LUCK!!!",0,5);
menu_lcd.refresh();
- int i=0;
- /*
- while (i<=10){
- batPad.leds_on();
- wait(0.1);
- batPad.leds_off();
- wait(0.1);
- i++;
- }
- */
- wait(3);
-
+ wait(1);
}