From 74f1d443644c8654d9fbc3bf48f5d3b87e48c199 Mon Sep 17 00:00:00 2001 From: Albin Date: Thu, 14 Nov 2019 09:35:15 +0100 Subject: =?UTF-8?q?V=C3=A4lj=20ref-time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kod/bilbana/Graph/graphs_test.m | 12 +++++++++--- Kod/bilbana/yc4/main.m | 10 +++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'Kod/bilbana') diff --git a/Kod/bilbana/Graph/graphs_test.m b/Kod/bilbana/Graph/graphs_test.m index 955aeee..248e6da 100644 --- a/Kod/bilbana/Graph/graphs_test.m +++ b/Kod/bilbana/Graph/graphs_test.m @@ -14,6 +14,12 @@ ref_lap_time = 14; %% Actual test graphs(car1.lap_times,ref_lap_time,car1.seg_times,5) %} -position = 2.54; -segment = 2; -detect_missed(position,segment,1) \ No newline at end of file +ref_time = input('Vilken referenstid ska användas? [13] ', 's'); +ref_time = str2double(ref_time); +if isnan(ref_time) + ref_time = 13; +elseif not(isreal(ref_time)) + ref_time = 13; +end +disp(ref_time) +disp(ref_time*2) diff --git a/Kod/bilbana/yc4/main.m b/Kod/bilbana/yc4/main.m index 3c1b445..56b0014 100644 --- a/Kod/bilbana/yc4/main.m +++ b/Kod/bilbana/yc4/main.m @@ -81,7 +81,15 @@ elseif car2.response == 'M' else car2.running = false; end - +%{ +ref_time = input('Vilken referenstid ska användas? [13] ', 's'); +ref_time = str2double(ref_time); +if isnan(ref_time) + ref_time = 13; +elseif not(isreal(ref_time)) + ref_time = 13; +end +%} ref_time = 13; %% MAIN LOOP while 1 -- cgit v1.2.1