diff options
| author | Albin <albwa833@student.liu.se> | 2019-10-29 11:28:52 +0100 |
|---|---|---|
| committer | Albin <albwa833@student.liu.se> | 2019-10-29 11:29:20 +0100 |
| commit | 6b234ca1ff1828a7fcf795ada97a40d9d4de3f4a (patch) | |
| tree | 625621ea017ee81888b353beafd0ea5aeb50a236 | |
| parent | 106ac305c758766007ef682fd53caa3b089e60ec (diff) | |
| download | tfyy51-6b234ca1ff1828a7fcf795ada97a40d9d4de3f4a.tar.gz | |
Use && instead of &
| -rw-r--r-- | Kod/bilbana/yc4/main.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Kod/bilbana/yc4/main.m b/Kod/bilbana/yc4/main.m index b77684a..64ad6ce 100644 --- a/Kod/bilbana/yc4/main.m +++ b/Kod/bilbana/yc4/main.m @@ -156,7 +156,7 @@ while 1 end %% CALCULATE (CAR 2) - if car1.running == true & car1.automatic == true + if car1.running == true && car1.automatic == true car1.car_constant = get_car_constant(1); car1.v = get_new_v(car1.segment); car1.track_u_constant = get_track_u_constant(); @@ -164,7 +164,7 @@ while 1 end %% CALCULATE (CAR 2) - if car2.running == true & car2.automatic == true + if car2.running == true && car2.automatic == true car2.car_constant = get_car_constant(2); car2.v = get_new_v(car2.segment); car2.track_u_constant = get_track_u_constant(); @@ -172,21 +172,21 @@ while 1 end %% CONTROLLER (CAR 1) - if car1.running == true & car1.automatic == false + if car1.running == true && car1.automatic == false % TODO end %% CONTROLLER (CAR 2) - if car2.running == true & car2.automatic == false + if car2.running == true && car2.automatic == false % TODO end %% EXECUTE - if car1.running == true & car1.automatic == true + if car1.running == true && car1.automatic == true set_car_speed(1, car1.u); - end - if car2.running == true & car2.automatic == true + end + if car2.running == true && car2.automatic == true set_car_speed(2, car2.u); end %% DISPLAY |
