From 1a5ecc5ce4c739e0e9e22f13dd384c98a849572f Mon Sep 17 00:00:00 2001 From: Albin Date: Wed, 20 Nov 2019 19:15:08 +0100 Subject: =?UTF-8?q?Bootstrap=20funkar=20f=C3=B6r=204=20bilar=20(bl=C3=A5?= =?UTF-8?q?=2017,=20vit=2082,=20bussen,=20gr=C3=A5=2067)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kod/bilbana/yc4/do_boot.m | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Kod/bilbana/yc4/do_boot.m') diff --git a/Kod/bilbana/yc4/do_boot.m b/Kod/bilbana/yc4/do_boot.m index ffa7878..31f4db0 100644 --- a/Kod/bilbana/yc4/do_boot.m +++ b/Kod/bilbana/yc4/do_boot.m @@ -5,11 +5,25 @@ if car.running == true %% BEFORE FIRST LAP if car.lap == 0 t = toc(boot.time); - if t > 1 + if t > 0.6 car.constant = car.constant + 0.05; disp(car.constant) boot.time = tic; end end + %% First segment + if car.lap == 1 && car.segment == 1 + t = toc(boot.time); + if t > 3 + car.constant = car.constant + 0.05; + disp(car.constant) + boot.time = tic; + end + end + %% END BOOTSTRAP + if car.segment > 2 + boot.status = 0; + disp('END OF BOOTSTRAP') + end end end \ No newline at end of file -- cgit v1.2.1