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: L432KC_SPI_Pey_Lal
Revision 118:67d6698069fd, committed 2022-05-23
- Comitter:
- voltxd
- Date:
- Mon May 23 17:18:33 2022 +0000
- Parent:
- 117:58148bdd13b7
- Commit message:
- ajoutvitesse;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon May 23 13:05:26 2022 +0000 +++ b/main.cpp Mon May 23 17:18:33 2022 +0000 @@ -158,6 +158,8 @@ //Measure car speed double currentSpeedPeriod = tSpeed.read(); currentSpeed = DISTANCE_FOR_HALF_TURN / currentSpeedPeriod; + if (pulsewidth_propulsion > 1500) + currentSpeed = -currentSpeed; tSpeed.reset(); }