summaryrefslogtreecommitdiffstats
path: root/Kod/scripts/test_givare.m
diff options
context:
space:
mode:
Diffstat (limited to 'Kod/scripts/test_givare.m')
-rw-r--r--Kod/scripts/test_givare.m29
1 files changed, 27 insertions, 2 deletions
diff --git a/Kod/scripts/test_givare.m b/Kod/scripts/test_givare.m
index 204d501..5ad8afd 100644
--- a/Kod/scripts/test_givare.m
+++ b/Kod/scripts/test_givare.m
@@ -26,8 +26,33 @@ while 1
[car1.new_lap, car1.new_check_point, car1.time] = get_car_position(1);
[car2.new_lap, car2.new_check_point, car2.time] = get_car_position(2);
- if car1.new_lap == true || car1.new_check_point == true || car2.new_lap == true || car2.new_check_point == true
- beep;
+ if car1.new_check_point
+ beep;
+ disp('car 1 cp')
+ end
+ if car2.new_check_point
+ beep;
+ disp('car 2 cp')
+ end
+ if car1.new_lap
+ beep;
+ disp('car 1 lap')
+ end
+ if car2.new_lap
+ beep;
+ disp('car 2 lap')
+ end
+ % KOMPENSERA FÖR TRASIG BANA
+ if car1.new_lap && car2.new_check_point
+ car2.new_lap = 0;
+ end
+ pause(0.1)
+
+ if car2.new_lap
+ disp('NEW LAP CAR 2!')
+ end
+ if car2.new_check_point
+ disp('NEW CHECKPOINT CAR 2!')
end
pause(0.1)