test avoid bulled game

Dependencies:   C12832_lcd LCD_fonts mbed mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
kaku_jyoko
Date:
Fri Dec 16 13:52:36 2016 +0000
Parent:
62:5d3f6c919fbc
Commit message:
remove led lump

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Dec 14 14:24:27 2016 +0000
+++ b/main.cpp	Fri Dec 16 13:52:36 2016 +0000
@@ -14,7 +14,6 @@
 // down: p12, left: p13, center: p14, up: p15, right: p16
 InterruptIn button(p14);
 AnalogIn aIn(p20);
-BusOut leds(LED1, LED2, LED3, LED4);
 
 Mutex jump_mtx;
 Mutex update_mtx;
@@ -59,6 +58,7 @@
 void jump_receive(void const *argument){
     while(true){
         jump_mtx.lock();
+        wait(0.01);
         button.rise(&call_jump);
         jump_mtx.unlock();
         //Thread::wait(0.1);
@@ -81,17 +81,6 @@
         t.start();
         c = pc.getc();
         bullet_mtx.lock();
-        if(t.read() > 5.0){
-            leds = 0xf;
-        }else if(t.read() > (5.0 / 4.0 * 3.0)){
-            leds = 0x7;
-        }else if(t.read() > (5.0 / 4.0 * 2.0)){
-            leds = 0x3;
-        }else if(t.read() > (5.0 / 4.0 * 1.0)){
-            leds = 0x1;
-        }else {
-            leds = 0x0;
-        }
         if(c >= '1' && c <= '9' && t.read() > 5.0){
             b = NULL;
             switch(c){