convert_KeilToMbed

Dependencies:   DigitDisplay Motor PID mbed millis

Fork of DagonFly__RoadToJapan_15Mei_Ultimate by KRAI 2017

Revision:
51:df6391c3fa68
Parent:
50:8bc9dbca2ffa
Child:
52:a39e26b935a9
--- a/main.cpp	Mon May 15 07:08:30 2017 +0000
+++ b/main.cpp	Mon May 15 07:49:13 2017 +0000
@@ -311,10 +311,14 @@
         // Power Screw Down
         caseJoystick = 12;       
     } 
-    else if (joystick.L3){
-        // Paku Bumi ON/OFF
+    else if (joystick.LYp_click) {
+        // Paku Bumi Naik
         caseJoystick = 34;
     }
+    else if (joystick.LYn_click) {
+        // Paku Bumi Turun
+        caseJoystick = 35;
+    }
     else
     {
         tuneAksel = 0.6;
@@ -636,14 +640,19 @@
             isReload = true;
             break;
         }
-        case (34) :{
-            pneu_paku = !pneu_paku;
+        case (34) :
+        {
+            pneu_paku = 1;
+            // Paku Bumi Naik
             wait_ms(50);
-            if (pneu_paku == 1){
-                PIVOT = 0.17;
-            }else{
-                PIVOT = 0.8;
-            }
+            PIVOT = 0.17;
+        }
+        case (35) :
+        {
+            // Paku Bumi Turun
+            pneu_paku = 0;
+            wait_ms(50);
+            PIVOT = 0.8;
         }
         default : 
         {