summaryrefslogtreecommitdiffstats
path: root/Kod/bilbana/yc4/main.m
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:29:20 +0100
commit6b234ca1ff1828a7fcf795ada97a40d9d4de3f4a (patch)
tree625621ea017ee81888b353beafd0ea5aeb50a236 /Kod/bilbana/yc4/main.m
parent106ac305c758766007ef682fd53caa3b089e60ec (diff)
downloadtfyy51-6b234ca1ff1828a7fcf795ada97a40d9d4de3f4a.tar.gz
Use && instead of &
Diffstat (limited to 'Kod/bilbana/yc4/main.m')
-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