yei

Dependencies:   interface mbed enc_1multi calPID motorout KondoServoLibrary

Fork of cat18_operate by Catch the GIANT Caplico!

Revision:
30:af136b83b202
Parent:
29:ea48140fc85e
Child:
32:21229c96144a
--- a/servo/servo.cpp	Tue Sep 04 12:53:50 2018 +0000
+++ b/servo/servo.cpp	Tue Sep 04 23:03:50 2018 +0000
@@ -8,14 +8,14 @@
 //////////////////////////////変更できるパラメータ
 const int kServoSign[] = {-1, -1, -1, -1};//サーボの正負と座標系の正負の補正
 const double kOriginDegree[] = {
-    (8868 - 3500)  * kServoValToDegree,
-    (5832 - 3500)  * kServoValToDegree + 90,
-    (7543 - 3500) * kServoValToDegree,
+    (8850 - 3500)  * kServoValToDegree - 10,
+    (8635 - 3500)  * kServoValToDegree,
+    (7533 - 3500) * kServoValToDegree,
     (8000 - 3500) * kServoValToDegree,
 };//初期状態の角度
 const int kServoSpan_ms = 3; //指示の前後に必要なwait
 const double kOpenVal = (7400 - 3500) * kServoValToDegree;//ハンドを開いたときのサーボへの指示
-const double kCloseVal = (5200 - 3500) * kServoValToDegree;//ハンドを閉じたときのサーボへの指示
+const double kCloseVal = (5200 - 3500) * kServoValToDegree - 3;//ハンドを閉じたときのサーボへの指示
 const int kTipServoID = 4;
 //////////////////////////////
 KondoServo servo[] = {KondoServo(pin_serial_servo_tx[0], pin_serial_servo_rx[0]),//サーボID:2,3,4
@@ -62,7 +62,7 @@
 //一般性は皆無
 void ServoMoveOnArm()
 {
-    for(int i = 0; i < 2; i++) {
+    for(int i = 0; i < 4; i++) {
         ServoMoveOnArmInTurns();
         wait_ms(kServoSpan_ms);
     }