春ロボ1班(元F3RC4班+) / Mbed 2 deprecated harurobo_mbed_undercarriage_sub_2_26

Dependencies:   Harurobo_CAN_2_26 mbed Maxon_setting_1_11 move4wheel2 EC PathFollowing_2_26 CruizCore_R1370P

Revision:
6:405c665a75f6
Parent:
5:51aa9e3256c5
--- a/main.cpp	Fri Feb 08 06:53:37 2019 +0000
+++ b/main.cpp	Mon Feb 25 15:28:59 2019 +0000
@@ -32,24 +32,36 @@
       
       
 
-/////////////以下自動モードプログラム/////////////
+////////////以下自動モードプログラム/////////////
 
 #ifdef HARUROBO_TEST_MODE //テスト自動プログラム(練習・動作確認用)
 
       //Debug_Control();
+      
+      can_start();
+      ticker.attach(&can_read,0.01);
     
-      gogo_straight(1,1,0,0,0,-300,200,1000,5,0.1,10,0.1,600,0);
-      purecurve2(6,1,1,0,-300,-600,-1000,9,1000,5,0.1,10,0.1,600,0);
-      purecurve2(5,1,1,-600,-1000,-1200,-1700,9,1000,5,0.1,10,0.1,600,0);
-      gogo_straight(1,1,-1200,-1700,-1200,-2000,1000,200,5,0.1,10,0.1,600,0);
+      /*while(1){
+          printf("usw_data3 = %f\n\r",usw_data3);
+          }*/
+          
+      set_cond(2,1,-700,1,-700);
+      gogo_straight(0,0,0,0,-300,-300,700,700,5,0.1,10,0.1,600,0);
+      MotorControl(0,0,0,0);
+      pos_correction(-300,-300,0,0,0);
+    
+/*    gogo_straight(1,1,0,0,0,-300,200,2500,5,0.1,10,0.1,600,0);
+      purecurve2(6,1,1,0,-300,-600,-1000,9,2500,5,0.1,10,0.1,600,0);
+      purecurve2(5,1,1,-600,-1000,-1200,-1700,9,2500,5,0.1,10,0.1,600,0);
+      gogo_straight(1,1,-1200,-1700,-1200,-2000,2500,200,5,0.1,10,0.1,600,0);
       MotorControl(0,0,0,0);
       pos_correction(-1200,-2000,0,1,1);
       wait(0.5);
 
-      gogo_straight(1,1,-1200,-2000,-1200,-1700,200,1000,5,0.1,10,0.1,600,0);
-      purecurve2(2,1,1,-1200,-1700,-600,-1000,9,1000,5,0.1,10,0.1,600,0);
-      purecurve2(1,1,1,-600,-1000,0,-300,9,1000,5,0.1,10,0.1,600,90);
-      gogo_straight(1,1,0,-300,0,300,1000,200,5,0.1,10,0.1,600,90);
+      gogo_straight(1,1,-1200,-2000,-1200,-1700,200,2500,5,0.1,10,0.1,600,0);
+      purecurve2(2,1,1,-1200,-1700,-600,-1000,9,2500,5,0.1,10,0.1,600,0);
+      purecurve2(1,1,1,-600,-1000,0,-300,9,2500,5,0.1,10,0.1,600,90);
+      gogo_straight(1,1,0,-300,0,300,2500,200,5,0.1,10,0.1,600,90);
       MotorControl(0,0,0,0);
       pos_correction(0,300,90,1,1);
       
@@ -58,24 +70,24 @@
       pos_correction(-200,300,90,1,1);
       wait(0.5);
       
-      gogo_straight(1,1,-200,300,0,600,200,1000,5,0.1,10,0.1,800,90);
-      purecurve2(3,1,1,0,600,-400,1000,9,1000,5,0.1,10,0.1,800,90);
-      purecurve2(4,1,1,-400,1000,-800,1400,9,1000,5,0.1,10,0.1,800,90);
-      purecurve2(2,1,1,-800,1400,-400,1800,9,1000,5,0.1,10,0.1,800,90);
-      gogo_straight(1,1,-400,1800,-300,1800,1000,1000,5,0.1,10,0.1,800,90);
-      gogo_straight(1,1,-300,1800,0,1800,1000,200,5,0.1,10,0.1,800,90);
+      gogo_straight(1,1,-200,300,0,600,200,2500,5,0.1,10,0.1,800,90);
+      purecurve2(3,1,1,0,600,-400,1000,9,2500,5,0.1,10,0.1,800,90);
+      purecurve2(4,1,1,-400,1000,-800,1400,9,2500,5,0.1,10,0.1,800,90);
+      purecurve2(2,1,1,-800,1400,-400,1800,9,2500,5,0.1,10,0.1,800,90);
+      gogo_straight(1,1,-400,1800,-300,1800,2500,2500,5,0.1,10,0.1,800,90);
+      gogo_straight(1,1,-300,1800,0,1800,2500,200,5,0.1,10,0.1,800,90);
       MotorControl(0,0,0,0);
       pos_correction(0,1800,90,1,1);
       wait(0.5);
       
-      gogo_straight(1,1,0,1800,-300,1800,200,1000,5,0.1,10,0.1,800,90);
-      gogo_straight(1,1,-300,1800,-900,1800,1000,1000,5,0.1,10,0.1,800,90);
-      purecurve2(5,1,1,-900,1800,-1300,1400,9,1000,5,0.1,10,0.1,600,180);
-      gogo_straight(1,1,-1300,1400,-1300,900,1000,1000,5,0.1,10,0.1,600,180);
-      gogo_straight(1,1,-1300,900,-1300,600,1000,200,5,0.1,10,0.1,800,180);
+      gogo_straight(1,1,0,1800,-300,1800,200,2500,5,0.1,10,0.1,800,90);
+      gogo_straight(1,1,-300,1800,-900,1800,2500,2500,5,0.1,10,0.1,800,90);
+      purecurve2(5,1,1,-900,1800,-1300,1400,9,2500,5,0.1,10,0.1,600,180);
+      gogo_straight(1,1,-1300,1400,-1300,900,2500,2500,5,0.1,10,0.1,600,180);
+      gogo_straight(1,1,-1300,900,-1300,600,2500,200,5,0.1,10,0.1,800,180);
       MotorControl(0,0,0,0);
       pos_correction(-1300,600,180,1,1);
-      
+*/
       
       //ticker.attach(&can_read,0.01);