I want go to sea

Dependencies:   arrc_mbed Servo air

Files at this revision

API Documentation at this revision

Comitter:
darkumatar
Date:
Fri Apr 08 09:29:59 2022 +0000
Parent:
4:7e2aa008f84b
Commit message:
a;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Apr 01 00:23:31 2022 +0000
+++ b/main.cpp	Fri Apr 08 09:29:59 2022 +0000
@@ -58,20 +58,22 @@
         tim=timer.read_ms();
         a=0;        
     }
-    if(!limitC==0){
-            a=1;
-    }
-    if(timer.read_ms()-tim<1000){
+    if(timer.read_ms()-tim<500){
             hassya.move(0);
             driveMotorS2(0);
             Servo(1);
-    }else if(timer.read_ms()-tim<2000){
+    }else if(timer.read_ms()-tim<1000){
             hassya.move(1);
             driveMotorS2(0);
             Servo(0);
-    }else if(timer.read_ms()-tim>2000 && a==0){
+    }else if((timer.read_ms()-tim>1000 && !limitC==0) || a==1){
+            hassya.move(0);
+            driveMotorS2(0);
+            Servo(0);
+            a=1;
+    }else if(timer.read_ms()-tim>1000 && a==0){
             hassya.move(1);
-            driveMotorS2(-0.15);
+            driveMotorS2(-0.1);
             Servo(0);
     }else{
             hassya.move(0);