MMlab / Mbed 2 deprecated PING_ultrasonic

Dependencies:   USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
denki5119Z
Date:
Sat Oct 08 09:01:47 2016 +0000
Parent:
12:36a6bae22fbf
Commit message:
??????????y?????????????

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
USBJoysteck.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/USBDevice.lib	Sat Oct 08 05:12:21 2016 +0000
+++ b/USBDevice.lib	Sat Oct 08 09:01:47 2016 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/MMlab/code/USBDevice/#7673db888e34
+http://developer.mbed.org/teams/MMlab/code/USBDevice/#173b1cc74a25
--- a/USBJoysteck.cpp	Sat Oct 08 05:12:21 2016 +0000
+++ b/USBJoysteck.cpp	Sat Oct 08 09:01:47 2016 +0000
@@ -53,7 +53,7 @@
     report.data[4] = ((_button & 0x0f) << 4) | (_hat & 0x0f) ;
     report.length = 5;
 
-    return sendNB(&report);
+    return send(&report);
 }
 
 bool USBJoystick::throttle(int16_t t)
--- a/main.cpp	Sat Oct 08 05:12:21 2016 +0000
+++ b/main.cpp	Sat Oct 08 09:01:47 2016 +0000
@@ -37,7 +37,8 @@
     argv=atan(10/(avg2-avg1));  //θを求める
 
     x = argv/3.141516*60.0;
-    y = v/5.0*240.0-120.0;
+    //y = v/5.0*240.0-120.0;
+    y = v/5.0*120.0;
     button=2;
     printf("\n|v|: %lf theta: %lf\n",v,argv); //最終的にだすやつ
     printf("\n x : %d y   : %d\n",x,y); //最終的にだすやつ