From 6b234ca1ff1828a7fcf795ada97a40d9d4de3f4a Mon Sep 17 00:00:00 2001 From: Albin Date: Tue, 29 Oct 2019 11:28:52 +0100 Subject: Use && instead of & --- Kod/bilbana/yc4/main.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Kod') 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 -- cgit v1.2.1