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.
Diff: main.cpp
- Revision:
- 1:aed433d882c9
- Parent:
- 0:32eb0835b5a3
- Child:
- 2:144ca2f5d850
diff -r 32eb0835b5a3 -r aed433d882c9 main.cpp
--- a/main.cpp Tue Jan 20 15:58:19 2015 +0000
+++ b/main.cpp Wed Jan 21 16:20:12 2015 +0000
@@ -5,20 +5,24 @@
/*
* ルンバ向けイベント引数クラス
*/
-class RoombaEventArg : public EventArg
-{
- typedef EventArg base;
-
- public:
- RoombaEventArg() {
- leftWheetVelocity = 0;
- rightWheelVelocity = 0;
- };
-
- public:
- int leftWheetVelocity;
- int rightWheelVelocity;
-};
+//class RoombaEventArg : public EventArg
+//{
+// typedef EventArg base;
+//
+// public:
+// //RoombaEventArg(int leftWheetVelocity, int rightWheelVelocity} {
+//
+// //}
+//
+// RoombaEventArg() {
+// leftWheetVelocity = 0;
+// rightWheelVelocity = 0;
+// };
+//
+// public:
+// int leftWheetVelocity;
+// int rightWheelVelocity;
+//};
//
///*
@@ -87,12 +91,15 @@
//ticker.attach(roomba.periodicCallback, 0.1);
//TODO:Serial receive message.
+
+ int leftWheelVelocity = 500;
+ int rightWheelVelocity = -500;
+
+ EventArg e;//(leftWheelVelocity, rightWheelVelocity);
+ e.leftWheetVelocity = leftWheelVelocity;
+ e.rightWheelVelocity = rightWheelVelocity;
- while (true) {
- RoombaEventArg e;
- e.leftWheetVelocity = 20;
- e.rightWheelVelocity = 30;
-
+ while (true) {
roomba.periodicCallback(e);
wait_ms(100);
}