blob: 8df03f7af75fa00b3f1fb1596862c64cd250619a (
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
|
function [] = send_data_to_display()
%SEND_DATA_TO_DISPLAY sends available data to display if last send was
% more than 0.5 seconds ago.
persistent last_send;
global display_data;
if isempty(display_data)
return
end
disp(last_send);
disp(clock);
if isempty(last_send) % first send
%% SEND DATA
disp('sending data');
disp(display_data)
matlabclient(1, display_data{1});
last_send = clock;
display_data(1) = [];
elseif (etime(clock, last_send) >= 0.5)
%% SEND DATA
disp('sending data');
disp(display_data)
matlabclient(1, display_data{1});
last_send = clock;
display_data(1) = [];
end
end
|