Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jesse Heckman
pbtoolbox
Commits
a7f4d801
Commit
a7f4d801
authored
Oct 22, 2018
by
Jesse Heckman
Browse files
updates
parent
620738e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
subtools/draft/@pb_draft/draft.m
0 → 100644
View file @
a7f4d801
function
obj
=
draft
(
obj
)
% OBJ.DRAFT()
%
% DRAFT() ...
%
% See also PB_DRAFT
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
% If no parent was given we use the current figure
if
isempty
(
obj
(
1
)
.
parent
)
for
iObj
=
1
:
numel
(
obj
)
obj
(
iObj
)
.
parent
=
gcf
;
end
end
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% %
% Part of Programmeer Beer Toolbox (PBToolbox) %
% Written by: Jesse J. Heckman (2018) %
% %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
subtools/draft/@pb_draft/pb_draft.m
View file @
a7f4d801
classdef
pb_draft
<
hand
le
classdef
pb_draft
<
matlab
.
mixin
.
Copyab
le
% PB_DRAFT
%
% d = pb_draft creates a instance of a DRAFT figure.
...
...
@@ -7,19 +7,42 @@ classdef pb_draft < handle
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
%% Properties
% Set public properties
properties
(
Access
=
public
)
title
=
[];
...
end
methods
(
Access
=
public
)
% Set protected properties
properties
(
Access
=
protected
,
Hidden
=
true
)
parent
=
[];
...
end
function
obj
=
pb_draft
(
varargin
)
set_title
(
obj
);
...
end
%% Methods
%
Define public methods
methods
(
Access
=
public
)
% Constructor function
function
obj
=
pb_draft
(
varargin
)
set_title
(
obj
);
...
end
obj
=
create_figure
(
obj
,
fig
)
obj
=
draft
(
obj
);
function
obj
=
set_parent
(
obj
,
parent
)
obj
.
parent
=
parent
;
...
end
end
...
end
...
...
subtools/lsl/pb_runLSL.m
View file @
a7f4d801
function
[
ses
,
str
]
=
pb_runLSL
()
function
[
ses
,
str
]
=
pb_runLSL
(
varargin
)
% PB_RUNLSL()
%
% PB_RUNLSL() creates a LSL session for VC.
...
...
@@ -7,14 +7,27 @@ function [ses,str] = pb_runLSL()
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
de
=
pb_keyval
(
'de'
,
varargin
,
true
);
pl
=
pb_keyval
(
'pl'
,
varargin
,
true
);
ot
=
pb_keyval
(
'ot'
,
varargin
,
true
);
tmp
=
{};
streams
=
{
'type=
''
Digital Events @ lslder01
''
and name=
''
Digital Events 1
''
'
,
...
'type=
''
Pupil Capture @ pupil-desktop.local
''
and name=
''
Pupil Primitive Data - Eye 0
''
'
,
...
'type=
''
OptiTrack Mocap @ DCN-VSO3
''
and name=
''
Labeled Markers
''
'
};
if
de
;
tmp
(
end
+
1
)
=
streams
{
1
};
end
if
pl
;
tmp
(
end
+
1
)
=
streams
{
2
};
end
if
ot
;
tmp
(
end
+
1
)
=
streams
{
3
};
end
streams
=
tmp
;
ses
=
lsl_session
();
str
=
lsl_istream
.
empty
(
0
,
3
);
for
iStrm
=
1
:
2
%length(streams)
clear
tmp
;
for
iStrm
=
1
:
length
(
streams
)
% Find, select and make streams for LSL.
tmp
=
strrep
(
streams
(
iStrm
),
'type=
''
'
,
''
);
tmp
=
tmp
{
1
}(
1
:
find
(
tmp
{
1
}
==
'@'
,
1
)
-
2
);
...
...
@@ -32,9 +45,10 @@ function [ses,str] = pb_runLSL()
ses
.
add_stream
(
str
(
iStrm
));
end
addlistener
(
str
(
1
),
'DataAvailable'
,
@
ev_listener
);
addlistener
(
str
(
2
),
'DataAvailable'
,
@
pl_listener
);
%addlistener(str(3),'DataAvailable', @ot_listener);
c
=
1
;
if
de
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
ev_listener
);
c
=
c
+
1
;
end
if
pl
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
pl_listener
);
c
=
c
+
1
;
end
if
ot
;
addlistener
(
str
(
c
),
'DataAvailable'
,
@
ot_listener
);
end
end
function
ev_listener
(
~
,
event
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment