summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbin <albwa833@student.liu.se>2019-10-29 11:28:52 +0100
committerAlbin <albwa833@student.liu.se>2019-10-29 11:28:52 +0100
commit0adfa98e9c8bfe25a8a27a92fe66b2732bf87375 (patch)
tree625621ea017ee81888b353beafd0ea5aeb50a236
parentd5263d43a80f5897068672275de08fa6bf1eb54f (diff)
downloadtfyy51-0adfa98e9c8bfe25a8a27a92fe66b2732bf87375.tar.gz
Use && instead of &
-rw-r--r--Kod/bilbana/yc4/main.m14
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