summaryrefslogtreecommitdiffstats
path: root/Kod
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-11-23 21:43:32 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-11-23 21:43:32 +0100
commit49f712d1a24fba77a1f775af2333855849ddd87d (patch)
tree987d9f94a78e7fbe8d0e6ea8bd199e74cb533e3d /Kod
parentfd263fa24277daa3dc6ffb163edc9879c3e62e4b (diff)
downloadtfyy51-49f712d1a24fba77a1f775af2333855849ddd87d.tar.gz
fix indents
Diffstat (limited to 'Kod')
-rw-r--r--Kod/bilbana/yc4/display/scenes/draw_segment_bars.m50
1 files changed, 26 insertions, 24 deletions
diff --git a/Kod/bilbana/yc4/display/scenes/draw_segment_bars.m b/Kod/bilbana/yc4/display/scenes/draw_segment_bars.m
index d778323..f2703b2 100644
--- a/Kod/bilbana/yc4/display/scenes/draw_segment_bars.m
+++ b/Kod/bilbana/yc4/display/scenes/draw_segment_bars.m
@@ -1,48 +1,50 @@
function [] = draw_segment_bars(values1, values2)
-pause(0.2);
+dt = 0.2;
+
+pause(dt);
matlabclient(1, get_smallpackage(clear_display()));
-pause(0.2);
+pause(dt);
matlabclient(1, get_smallpackage(put_text(160, 8, 'C', 'Genomsnittlig tid per segment')))
-pause(0.2);
+pause(dt);
% input('');
matlabclient(1, get_smallpackage([ ...
- key(0 , 216, 107, 240, 51, 61, 'C', 'Varv'), ...
- key(107, 216, 213, 240, 52, 62, 'C', 'Segment'), ...
- key(213, 216, 320, 240, 53, 63, 'C', 'Avsluta') ...
+ key(0 , 216, 107, 240, 51, 61, 'C', 'Varv'), ...
+ key(107, 216, 213, 240, 52, 62, 'C', 'Segment'), ...
+ key(213, 216, 320, 240, 53, 63, 'C', 'Avsluta') ...
]));
-pause(0.2);
+pause(dt);
matlabclient(1, get_smallpackage([ ...
- draw_line(20, 24, 20, 200), ... % y-axis
- put_text(9, 25, 'C', 's'), ... % label y-axis
- continue_line(304, 200), ... % x-axis
- draw_line(16, 32, 20, 24), ... % arrow on y, left part
- continue_line(24, 32), ... % arrow on y, right part
- draw_line(304, 196, 304, 204) ... % line on x
+ draw_line(20, 24, 20, 200), ... % y-axis
+ put_text(9, 25, 'C', 's'), ... % label y-axis
+ continue_line(304, 200), ... % x-axis
+ draw_line(16, 32, 20, 24), ... % arrow on y, left part
+ continue_line(24, 32), ... % arrow on y, right part
+ draw_line(304, 196, 304, 204) ... % line on x
]));
-pause(0.2);
+pause(dt);
[bars, max_val, min_y, max_height] = get_bars_from_values(values1, values2);
for bar = bars
- matlabclient(1, get_smallpackage(fill_area(bar.x_lo, bar.y_lo, bar.x_hi, bar.y_hi)));
- pause(0.2);
+ matlabclient(1, get_smallpackage(fill_area(bar.x_lo, bar.y_lo, bar.x_hi, bar.y_hi)));
+ pause(dt);
end
for i = 0:8
- x = 16+13 + 10 + 30*i;
- matlabclient(1, get_smallpackage(put_text(x, 204, 'C', num2str(i + 1))));
- pause(0.2);
+ x = 16+13 + 10 + 30*i;
+ matlabclient(1, get_smallpackage(put_text(x, 204, 'C', num2str(i + 1))));
+ pause(dt);
end
for i = 1:floor(max_val)
- x = 20;
- y = min_y - round(max_height * (i/max_val));
- matlabclient(1, get_smallpackage([draw_line(x, y, 320, y), ...
- put_text(x-6, y-2, 'C', num2str(i))]));
- pause(0.2);
+ x = 20;
+ y = min_y - round(max_height * (i/max_val));
+ matlabclient(1, get_smallpackage([draw_line(x, y, 320, y), ...
+ put_text(x-6, y-2, 'C', num2str(i))]));
+ pause(dt);
end
end