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: Tracker mbed MotorV2 SRF05 nRF24L01P
Fork of DUMP_TRUCK_TEST_V1 by
Revision 1:90b640c90506, committed 2016-11-01
- Comitter:
- Josahty
- Date:
- Tue Nov 01 20:19:20 2016 +0000
- Parent:
- 0:6942f0e2198c
- Child:
- 2:7811df5a6052
- Commit message:
- new version, added working error catch to drive()
Changed in this revision
| DumpTruck.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DumpTruck.cpp Tue Nov 01 20:13:57 2016 +0000
+++ b/DumpTruck.cpp Tue Nov 01 20:19:20 2016 +0000
@@ -58,9 +58,9 @@
pc.printf("Please enter the truck speed: \n");
// sets return value to given value
float input = pc.getc();
- while ((input<48)&&(input>57)){
+ while ((input<48)||(input>57)){
pc.printf("Fix your input sir: \r\n");
- float input = pc.getc();
+ input = pc.getc();
}
input = input - 48;
input = input * (1/div);
