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
dab5e229
Commit
dab5e229
authored
Oct 23, 2018
by
Jesse Heckman
Browse files
updated servo
parent
d7f21ff6
Changes
5
Hide whitespace changes
Inline
Side-by-side
setups/vestibular chair/vPrime/core/pb_vRunExp.m
View file @
dab5e229
...
...
@@ -51,8 +51,8 @@ function pb_vRunExp(handles)
% start vestibular chair
if
~
ismac
&&
~
debug
pb_sendServo
(
vs
,
profile
);
pb_startServo
(
vs
)
;
pb_sendServo
(
profile
);
vs
=
pb_startServo
;
pause
(
6
);
blockTime
=
tic
;
% allow vestibular chair to get in sync with input signal
end
...
...
@@ -85,7 +85,8 @@ function pb_vRunExp(handles)
elapsedTime
=
toc
(
blockTime
);
if
elapsedTime
<
dur
;
pause
(
dur
-
floor
(
elapsedTime
));
end
% wait untill chair is finished running before disabling.
Dat
=
pb_stopServo
(
vs
);
pb_stopServo
(
vs
);
Dat
=
pb_readServo
;
end
% stop recording
...
...
subtools/servo/pb_readServo.m
View file @
dab5e229
function
D
=
pb_readServo
(
vs
)
function
D
=
pb_readServo
% PB_READSERVO()
%
% PB_READSERVO() ...
...
...
@@ -7,9 +7,9 @@ function D = pb_readServo(vs)
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
vs
=
vs_servo
;
[
sv
.
vertical
,
sv
.
horizontal
]
=
vs
.
read_profile_sv
;
[
pv
.
vertical
,
pv
.
horizontal
]
=
vs
.
read_profile_pv
;
delete
(
vs
);
D
.
sv
=
sv
;
...
...
subtools/servo/pb_sendServo.m
View file @
dab5e229
function
pb_sendServo
(
vs
,
profile
)
function
pb_sendServo
(
profile
)
% PB_SENDSERVO()
%
% PB_SENDSERVO() ...
...
...
@@ -6,8 +6,9 @@ function pb_sendServo(vs,profile)
% See also ...
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
vs
=
vs_servo
;
vs
.
write_profile
(
profile
.
v
,
profile
.
h
);
delete
(
vs
);
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
...
...
subtools/servo/pb_startServo.m
View file @
dab5e229
function
pb_startServo
(
vs
)
function
vs
=
pb_startServo
% PB_STARTSERVO()
%
% PB_STARTSERVO() ...
...
...
@@ -7,6 +7,9 @@ function pb_startServo(vs)
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
vs
=
vs_servo
;
vs
.
enable
;
pause
(
1
);
vs
.
start
;
end
...
...
subtools/servo/pb_stopServo.m
View file @
dab5e229
...
...
@@ -9,9 +9,6 @@ function pb_stopServo(vs)
vs
.
stop
;
vs
.
disable
;
Dat
=
pb_readServo
(
vs
);
delete
(
vs
);
end
...
...
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