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: USBHost USBHostXpad mbed-rtos mbed
Diff: Traxster.cpp
- Revision:
- 2:5e870c215495
- Parent:
- 0:79485480cd7e
- Child:
- 3:c1620db50a75
diff -r 3bae10d2507c -r 5e870c215495 Traxster.cpp
--- a/Traxster.cpp Thu Nov 13 23:29:03 2014 +0000
+++ b/Traxster.cpp Sat Nov 15 21:42:16 2014 +0000
@@ -20,6 +20,10 @@
int m1 = getMotorSpeedInt(fm1);
int m2 = getMotorSpeedInt(fm2);
+ //clear robot msgs
+ while (rob.readable())
+ rob.getc();
+
if (m1 == 0 && m2 == 0)
{
rob.puts("stop\r");
@@ -28,6 +32,8 @@
{
rob.printf("mogo 1:%d 2:%d\r", m1, m2);
}
+
+ //clear robot msgs
while (rob.readable())
rob.getc();
}
