Commit 400464c4 authored by Simone Liuzzo's avatar Simone Liuzzo

updated to use function handles

parent 26960fed
......@@ -4,7 +4,7 @@ function [h,v,s] = getTbTdata_EBS_SIMU(obj)
% read BPM TbT buffer counter
data_counter = obj.bpm_trigger_counter;
data_counter = obj.bpm_trigger_counter();
pause(1.0) % necessary!! or later trigger counter re-reading will be already after KE shot!
% necessary!! or could read two identical buffers!
......@@ -12,7 +12,7 @@ pause(1.0) % necessary!! or later trigger counter re-reading will be already aft
% wait for trigger couter to change
integralwaited = 0.0;
dt =0.2;
while obj.bpm_trigger_counter == data_counter
while obj.bpm_trigger_counter() == data_counter
disp('waiting for fresh data');
pause(dt);
integralwaited = integralwaited + dt;
......@@ -20,7 +20,7 @@ while obj.bpm_trigger_counter == data_counter
warning('Waiting too long for new data, take what is available');
break
end
disp(['next data ' num2str(obj.bpm_trigger_counter) ' before Ke: ' num2str(data_counter)]);
disp(['next data ' num2str(obj.bpm_trigger_counter()) ' before Ke: ' num2str(data_counter)]);
end
......@@ -31,8 +31,8 @@ try
end
pause(1);
% read BPM Turn-by-Turn
h = obj.hor_bpm_TBT;
v = obj.ver_bpm_TBT;
h = obj.hor_bpm_TBT();
v = obj.ver_bpm_TBT();
% warning('logic/scalar error && -> & !')
s = ~isnan(h) & ~isnan(v) ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment