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 34:cb9a0cec2feb, committed 2021-11-22
- Comitter:
- aalawfi
- Date:
- Mon Nov 22 22:27:14 2021 +0000
- Parent:
- 33:0a1e29085b79
- Commit message:
- - 3 Laps, fastest is ~~12.3s
Changed in this revision
driving.h | Show annotated file Show diff for this revision Revisions of this file |
steering_header.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/driving.h Mon Nov 22 21:54:27 2021 +0000 +++ b/driving.h Mon Nov 22 22:27:14 2021 +0000 @@ -58,7 +58,6 @@ float x; Timer t; -Timer laptimer; bool clampLeft = false; bool clampRight = false; @@ -150,13 +149,13 @@ enable_brakes(); t.start(); - if (t.read_ms() > 50) + if (t.read_ms() > 150) { disable_brakes(); t.stop(); } - setpointLeft = 0.23; - setpointRight = 0.23; + setpointLeft = 0.21; + setpointRight = 0.21; } else if(counter == 3 && lap == 1 ) { @@ -174,7 +173,7 @@ enable_brakes(); t.start(); - if (t.read_ms() > 100) + if (t.read_ms() > 600) { disable_brakes(); t.stop(); @@ -198,7 +197,7 @@ } if (lap == 2 && counter == 0) { - lapTimerFinal = lapTimerCount; + lapTimerFinal = lapTimerCount / 1000; }
--- a/steering_header.h Mon Nov 22 21:54:27 2021 +0000 +++ b/steering_header.h Mon Nov 22 22:27:14 2021 +0000 @@ -47,4 +47,4 @@ volatile bool steering_enabled = true; Ticker steering_control_ticker; int counter=0; -int lap=0; +int lap=-1;