summaryrefslogtreecommitdiffstats
path: root/Kod/bilbana/yc4/do_boot.m
blob: 31f4db092adc95eb6eb679fc8ecdec2e8c8b69d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function [car, boot] = do_boot(car, boot)
%BOOT Summary of this function goes here
%   Detailed explanation goes here
if car.running == true
    %% BEFORE FIRST LAP
    if car.lap == 0
        t = toc(boot.time);
        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