TTDC / Mbed 2 deprecated switches

Dependencies:   C12832 MMA7660 mbed

Revision:
11:28887549c7d5
Parent:
10:9ca51c678bec
Child:
12:1d5832974d41
diff -r 9ca51c678bec -r 28887549c7d5 main.cpp
--- a/main.cpp	Wed Mar 28 11:10:15 2018 +0000
+++ b/main.cpp	Wed Mar 28 13:43:08 2018 +0000
@@ -6,8 +6,7 @@
 extern COMMAND_TRRIGER   commandList[];
 extern COMMAND_TRRIGER   trrigerNull;
 
-BusIn joy(p15,p12,p13,p16);
-DigitalIn fire(p14);
+BusIn joyStick(p15,p12,p13,p16,p14);
 C12832 lcd(p5, p7, p6, p8, p11);
 
 int main()
@@ -23,9 +22,8 @@
     COMMAND_TRRIGER *current = &trrigerNull;
     while(true) {
         COMMAND_TRRIGER *request = NULL;
-        int trigger = fire ? 0xff : joy;
         for(int index = 0; commandList[index].trigger != 0x00; index++) {
-            if (trigger == commandList[index].trigger) {
+            if (joyStick == commandList[index].trigger) {
                 request = &commandList[index];
             }
         }