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.
Revision 9:4a795f28545b, committed 2015-11-29
- Comitter:
- Xiaofei
- Date:
- Sun Nov 29 00:03:03 2015 +0000
- Parent:
- 8:7e4dadb1cbac
- Commit message:
- c
Changed in this revision
| CommandPool.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| protocol.h | Show annotated file Show diff for this revision Revisions of this file | 
diff -r 7e4dadb1cbac -r 4a795f28545b CommandPool.cpp
--- a/CommandPool.cpp	Sat Nov 28 23:27:49 2015 +0000
+++ b/CommandPool.cpp	Sun Nov 29 00:03:03 2015 +0000
@@ -26,7 +26,9 @@
     _pool[LED] = new LedCommand();
     _pool[TURN_LEFT] = new TurnLeftCommand();
     _pool[TURN_RIGHT] = new TurnRightCommand();
+    _pool[STRAIGHT] = new GoStraightCommand();
     _pool[STOP] = new StopCommand();
+    
 }
     
 Command* CommandPool::getCommand(const char& cmdstr)
diff -r 7e4dadb1cbac -r 4a795f28545b protocol.h --- a/protocol.h Sat Nov 28 23:27:49 2015 +0000 +++ b/protocol.h Sun Nov 29 00:03:03 2015 +0000 @@ -5,14 +5,14 @@ const char LED = 0x00; const char TURN_LEFT = 0x01; const char TURN_RIGHT = 0x02; +const char STRAIGHT = 0x03; const char STOP = 0x05; -// Speeds for wheels +// Speeds for left wheel const char SPEED1 = 0x10; const char SPEED2 = 0x20; const char SPEED3 = 0x30; -// Speed direction, 1 = backward, 0 = forward const char NEGATIVE = 0x08; #endif