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: AccCar.cpp
- Revision:
- 1:54512aca944d
- Parent:
- 0:ca7cb51e9fd1
--- a/AccCar.cpp Sun Nov 10 23:02:16 2019 +0000 +++ b/AccCar.cpp Mon Nov 11 00:50:05 2019 +0000 @@ -58,17 +58,17 @@ } else if( position == 54 ) { if( waited) { - road->intersection_car = id; - speed = 1; + speed = road->intersection->attemptEnterIntersection(this->id); } else { speed = 0; waited = true; + road->intendToEnter(this->id); } } else if( position < 56 ) { speed = 1; } else { if( position == 56 ) { - road->intersection_car = -1; + road->intersection->leaveIntersection(); } if (forward_car != NULL && forward_car->position > -1) {