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: Bat/Bat.cpp
- Revision:
- 16:da0808d55de0
- Parent:
- 15:81a3aaf52647
--- a/Bat/Bat.cpp Wed Apr 24 21:17:22 2019 +0000
+++ b/Bat/Bat.cpp Sat Apr 27 11:45:11 2019 +0000
@@ -51,20 +51,20 @@
menu_lcd.refresh();
menu_lcd.refresh();
- while (batPad.check_event(Gamepad::START_PRESSED) == false) {
+ while ( batPad.check_event(Gamepad::START_PRESSED) == false) {
printf("2");
- batPad.leds_on();
+ batPad.leds_on();
wait(0.1);
- batPad.leds_off();
+ batPad.leds_off();
wait(0.1);
}
second_menu(menu_lcd);
- batPad.leds_off();
-
+ batPad.leds_off();
}
void Bat::second_menu(N5110 &menu_lcd){
+ while( batPad.check_event(Gamepad::A_PRESSED) == false){
batPad.leds_off();
menu_lcd.clear();
menu_lcd.drawRect(0,0,WIDTH,HEIGHT,FILL_TRANSPARENT);
@@ -73,18 +73,12 @@
menu_lcd.drawCircle(72,11,5,FILL_TRANSPARENT);
menu_lcd.printString("RULES",2,3);
menu_lcd.printString("B",70,3);
- menu_lcd.drawCircle(72,27,5,FILL_TRANSPARENT);
+ menu_lcd.drawCircle(72,27,5,FILL_TRANSPARENT);
menu_lcd.printString("CONTROLS",2,5);
menu_lcd.printString("Y",70,5);
- menu_lcd.drawCircle(72,42,5,FILL_TRANSPARENT);
-
+ menu_lcd.drawCircle(72,42,5,FILL_TRANSPARENT);
menu_lcd.refresh();
+ }
}
-void Bat::game_over(string message){
- //char buffer[14];
- //int length=sprintf(buffer,"%s",message);
- //menu_lcd.printString(buffer,3,1);
-}
-