-
Notifications
You must be signed in to change notification settings - Fork 2
/
listControls.m
27 lines (26 loc) · 1.02 KB
/
listControls.m
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
function [name,ControlType]=listControls(CamNum)
%{
Created by Sergio Bonaque-Gonzalez. Optical Engineer. August 2019
This program gets the available controls of ZWO cameras and displays it in the command window.
%}
control = libpointer ( 'int32Ptr' , int32(0));
calllib('ASICamera2','ASIGetNumOfControls',0,control);
controls_n=control.value;
name=cell(CamNum,controls_n);
ControlType=cell(CamNum,controls_n);
for j=0:CamNum-1
fprintf('List of controls for camera %i\n',j);
for i=0:controls_n-1
ControlCaps=CreateControlCaps(); %Creates structs for used functions
info=libstruct('s_ASI_CONTROL_CAPS',ControlCaps);
calllib('ASICamera2', 'ASIGetControlCaps', j,i,info);
name{j+1,i+1}=char(info.Name);
ControlType{j+1,i+1}=info.ControlType;
if i<10
fprintf('%i = %s:%s\n',i,name{j+1,i+1},char(info.Description));
else
fprintf('%i =%s:%s\n',i,name{j+1,i+1},char(info.Description));
end
end
end