daad

Dependencies:   mbed TrapezoidControl QEI

Revision:
16:3f2c2d89372b
Parent:
4:ba9df71868df
Child:
19:96a462583af9
--- a/Input/Switch/Switch.cpp	Sun Oct 21 02:14:15 2018 +0000
+++ b/Input/Switch/Switch.cpp	Mon Jul 01 13:00:20 2019 +0000
@@ -41,43 +41,58 @@
     }
 
     bool LimitSw::IsPressed(int index) {
-        // if(index > 0x0f) return false;
-
-        //printf("%d\n", index);
 
         MP_Channel ch;
         
         switch(index){
             case 0:
-            ch.all = 10;
+            ch.all = 8;
             break;
             case 1:
-            ch.all = 11;
+            ch.all = 9;
             break;
             case 2:
-            ch.all = 8;
+            ch.all = 10;
             break;
             case 3:
-            ch.all = 9;
+            ch.all = 11;
             break;
             case 4:
+            ch.all = 12;
+            break;
+            case 5:
+            ch.all = 13;
+            break;
+            case 6:
+            ch.all = 14;
+            break;
+            case 7:
+            ch.all = 15;
+            break;
+            case 8:
+            ch.all = 7;
+            break;
+            case 9:
             ch.all = 6;
             break;
-            case 5:
-            ch.all = 7;
-            break;
-            case 6:
+            case 10:
             ch.all = 4;
             break;
-            case 7:
+            case 11:
             ch.all = 5;
             break;
-            case 8:
+            case 12:
             ch.all = 2;
             break;
-            case 9:
+            case 13:
             ch.all = 3;
             break;
+            case 14:
+            ch.all = 0;
+            break;
+            case 15:
+            ch.all = 1;
+            break;
         }