Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of 2015robot_main by
Diff: main_ps3.cpp
- Revision:
- 86:5f0b065cb4d3
- Parent:
- 85:dd18a2d79956
- Child:
- 87:6b6b6611d33f
--- a/main_ps3.cpp Tue Oct 13 07:27:26 2015 +0000
+++ b/main_ps3.cpp Wed Oct 14 07:56:09 2015 +0000
@@ -19,8 +19,8 @@
//#define RED
/***コントローラ選択***/
-//#define IM920
-#define PS3
+#define IM920
+//#define PS3
/***回転機構測定***/
//#define MESURE
@@ -94,7 +94,7 @@
flagf=0;
targ_sita=0.065;
}
- if((step==3)&&(x<1950.0)) {
+ if((step==3)&&(x<2000.0)) {
targ_sita=PI/4;
step=4;
sendData(7,255);
@@ -104,23 +104,23 @@
step=114;
}
/***Cylinder***/
- if((x>3000.0)&&(CStep==1)) { /*nomal*/
+ if((x>3100.0)&&(CStep==1)) { /*nomal*/
if(!skip) sendData(1,1);
CStep=2;
}
- if((x>5930.0)&&(CStep==2)) {
+ if((x>5940.0)&&(CStep==2)) {
if(!skip) sendData(1,3);
CStep=3;
}
- if((x>7600.0)&&(CStep==3)) {
+ if((x>7650.0)&&(CStep==3)) {
if(!skip) sendData(1,2);
CStep=4;
}
- if((x<6600.0)&&(CStep==4)) {
+ if((x<6700.0)&&(CStep==4)) {
if(!skip) sendData(1,5);
CStep=5;
}
- if((x<6100.0)&&(CStep==5)) {
+ if((x<6160.0)&&(CStep==5)) {
if(!skip) sendData(1,4);
CStep=114;
}
@@ -150,17 +150,17 @@
step=114;
}
- if((x>4750.0)&&(CStep==6)){
+ if((x>4650.0)&&(CStep==6)){
sendData(1,5);
CStep=7;
}
- if((x>5750.0)&&(CStep==7)){
+ if((x>5720.0)&&(CStep==7)){
sendData(1,4);
CStep=114;
}
/////////////////////////////////////////////////////////////////////////
/*****************************Opponents Mode****************************/
- if((step==15)&&((5700.0>x)&&(x>50.0))) {
+ if((step==15)&&((5700.0>x)&&(x>10.0))) {
targ_sita=0.03;
step=16;
}
@@ -299,7 +299,6 @@
move_following(); /*移動制御*/
}
else if(!autoflag) {
- resetState();
#ifdef IM920
manualMoveIM920(); /*analogStick*/
manualIM920(); /*IM920 button*/

