diff options
| author | alex <aletu130@student.liu.se> | 2019-11-22 12:53:15 +0100 |
|---|---|---|
| committer | alex <aletu130@student.liu.se> | 2019-11-22 12:53:15 +0100 |
| commit | b61d81b92dfb6515138fad71accb40fe3bba4c39 (patch) | |
| tree | fcb856314884d1f0743bf6035b843168f3f3992a /Kod/scripts | |
| parent | 1a5ecc5ce4c739e0e9e22f13dd384c98a849572f (diff) | |
| download | tfyy51-b61d81b92dfb6515138fad71accb40fe3bba4c39.tar.gz | |
Försöker komma runt trasiga givare
Diffstat (limited to 'Kod/scripts')
| -rw-r--r-- | Kod/scripts/test_givare.m | 29 |
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) |
