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.
Dependencies: VNH5019
Dependents: Aigamozu_Robot_展示会 Aigamozu_Robot_March Aigamozu_Robot_templete
Fork of AigamozuControlPackets by
Diff: AigamozuControlPackets.cpp
- Revision:
- 51:67f01969f709
- Parent:
- 50:61d72f617aa5
- Child:
- 52:d4d739f01b38
diff -r 61d72f617aa5 -r 67f01969f709 AigamozuControlPackets.cpp --- a/AigamozuControlPackets.cpp Thu Mar 30 10:47:49 2017 +0000 +++ b/AigamozuControlPackets.cpp Fri Mar 31 06:26:28 2017 +0000 @@ -1,7 +1,6 @@ #include "AigamozuControlPackets.h" #include "VNH5019.h" - #define LOW_SPEED 16 #define HIGH_SPEED 64 #define FORWARD_SPEED 64 @@ -61,25 +60,18 @@ _agzSheild.changeSpeed(2,128,2,128):for moving robot VNH5019参照 */ - - if(nowMode == AUTO_GPS_MODE){ + + if(nowMode == AUTO_GPS_MODE){ if(moveTimer.read_ms() <= 400){ _agzSheild.changeSpeed(1,HIGH_SPEED,0,LOW_SPEED);//時計回り - }else if(moveTimer.read_ms() > 400 && moveTimer.read_ms() <= 800){ - _agzSheild.changeSpeed(0,LOW_SPEED,1,HIGH_SPEED); //反時計回り - }else if(moveTimer.read_ms() > 800){ - _agzSheild.changeSpeed(1,HIGH_SPEED,0,LOW_SPEED);//時計回り - moveTimer.reset(); + }else if(moveTimer.read_ms() > 400 && moveTimer.read_ms() <= 500){ + _agzSheild.changeSpeed(0,LOW_SPEED,0,LOW_SPEED); //反時計回り } } - return 1; + return 1; } - - - - ////////////////////////////// // Mode change // @@ -118,6 +110,3 @@ } return false; } - - -