s-shape control

Files at this revision

API Documentation at this revision

Comitter:
piroro4560
Date:
Fri Sep 27 10:49:35 2019 +0000
Parent:
4:40c5ac00bb5b
Commit message:
adjustment

Changed in this revision

proto01.cpp Show annotated file Show diff for this revision Revisions of this file
proto01.h Show annotated file Show diff for this revision Revisions of this file
diff -r 40c5ac00bb5b -r b257821e4713 proto01.cpp
--- a/proto01.cpp	Mon Aug 26 06:10:05 2019 +0000
+++ b/proto01.cpp	Fri Sep 27 10:49:35 2019 +0000
@@ -21,7 +21,7 @@
         decdis    = decdis2;
         consdis   = targetDis - accdis - decdis;
     } else {
-        maxspeed /= 2;
+        maxspeed  = maxspeed2 / 2.0;
         accdis    = targetDis / 2;
         decdis    = targetDis / 2;
         consdis   = 0;
@@ -31,7 +31,7 @@
     decsec = 2.0 / maxspeed * decdis;
 }
 
-void Proto1::target_xy(int targetx_, int targety_, int startx_, int starty_)
+void Proto1::targetXY(int targetx_, int targety_, int startx_, int starty_)
 {
     targetDis = hypot((float)(startx_-targetx_), (float)(starty_-targety_));
     startx    = startx_;
@@ -44,7 +44,7 @@
         decdis    = decdis2;
         consdis   = targetDis - accdis - decdis;
     } else {
-        maxspeed /= 2;
+        maxspeed =  maxspeed / 2.0;
         accdis    = targetDis / 2;
         decdis    = targetDis / 2;
         consdis   = 0;
@@ -60,7 +60,7 @@
     nowDis = now - start;
 }
 
-void Proto1::Input_nowxy(int now_x, int now_y)
+void Proto1::Input_nowXY(int now_x, int now_y)
 {
     nowx      = now_x;
     nowy      = now_y;
diff -r 40c5ac00bb5b -r b257821e4713 proto01.h
--- a/proto01.h	Mon Aug 26 06:10:05 2019 +0000
+++ b/proto01.h	Fri Sep 27 10:49:35 2019 +0000
@@ -32,7 +32,7 @@
      * @param startx_  開始地点のx座標
      * @param starty_  開始地点のy座標
      */
-    void target_xy(int targetx_, int targety_, int startx_, int starty_);
+    void targetXY(int targetx_, int targety_, int startx_, int starty_);
 
     /**
      * 現在地点を入力
@@ -45,7 +45,7 @@
      * @param now_x 現在地点のx座標
      * @param now_y 現在地点のy座標
      */
-    void Input_nowxy(int now_x, int now_y);
+    void Input_nowXY(int now_x, int now_y);
 
     /**
      * S字に変化する速度を計算