Commit 7189530e authored by Simone Liuzzo's avatar Simone Liuzzo
Browse files

.set calibration moved to correct place. use .set instead of .value(read)

parent 1de4be3c
......@@ -135,7 +135,7 @@ classdef moovable < handle
% read attribute value
function v = get(obj)
% read attribute value in calibrated units
v = obj.attribute.value .* obj.calibration;
v = obj.attribute.set .* obj.calibration; % this should be .SET?
end
......@@ -145,9 +145,7 @@ classdef moovable < handle
% wait for set point to be reached.
%
% apply calibration
value = value ./ obj.calibration;
above = value>obj.max;
if any(above)
......@@ -162,8 +160,11 @@ classdef moovable < handle
warning(['Found ' num2str(length(find(below))) ' below minimum (' num2str(obj.min) '). Set to minimum.'])
end
% apply calibration
value_calib = value ./ obj.calibration;
% set value to attribute
obj.attribute.set = value;
obj.attribute.set = value_calib;
% wait for set point reached
v=obj.get;
......
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