from
TEC-Controller
by Mario Tuerschmann
TEC-Controller plug-in - controls your TEC with a temperature accuracy of 0.001 K
|
| TecController
|
function [axTecController] = TecController
NvGlFigurePos = get(0,'DefaultFigurePosition');
hNvGlFigure = figure('WindowStyle', 'docked',...
'DoubleBuffer', 'off',...
'ResizeFcn', {@figResize NvGlFigurePos(3)},...
'DeleteFcn',@figDelete);
%
ctrlSize = calcSize;
%
axTecController = actxcontrol('TecControl.TecController.1', ctrlSize, hNvGlFigure);
%
ctrlSize = calcSize;
move(axTecController,ctrlSize);
% Calculate size of control container
% based on size of figure
function ctrlSize = calcSize
fp = get(hNvGlFigure,'Position');
ctrlSize = fp([3 4 3 4]).*[0 0 1 1];
end % conSize
% Figure resize function
function figResize(src,evnt,dfp)
if ~exist('axTecController','var')
return
end
% Resize container
ctrlSize = calcSize;
move(axTecController,ctrlSize);
end % reSize
% Figure delete function
function figDelete(src,evnt)
axTecController.delete;
end
end
|
|
Contact us