diff options
| author | Albin <albwa833@student.liu.se> | 2019-11-20 19:15:08 +0100 |
|---|---|---|
| committer | Albin <albwa833@student.liu.se> | 2019-11-20 19:15:08 +0100 |
| commit | 1a5ecc5ce4c739e0e9e22f13dd384c98a849572f (patch) | |
| tree | de8174b67ba23901e4f2e92c0612cb5cc988ca3c /Kod/bilbana/yc4/do_boot.m | |
| parent | 9b04ca018663d2f1015a3c77f545ed2df6b7b79d (diff) | |
| download | tfyy51-1a5ecc5ce4c739e0e9e22f13dd384c98a849572f.tar.gz | |
Bootstrap funkar för 4 bilar (blå 17, vit 82, bussen, grå 67)
Diffstat (limited to 'Kod/bilbana/yc4/do_boot.m')
| -rw-r--r-- | Kod/bilbana/yc4/do_boot.m | 16 |
1 files changed, 15 insertions, 1 deletions
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 |
