Dateien hochladen nach „scenarios/scripts“
This commit is contained in:
parent
d72f4118e3
commit
e2d2bba1f7
@ -50,22 +50,20 @@ function initialize(box)
|
||||
|
||||
--load box settings
|
||||
row_base = _G[box:get_setting(2)]
|
||||
col_base = _G[box:get_setting(3)]
|
||||
n_tactilos = box:get_setting(4)
|
||||
n_repetitions = box:get_setting(5)
|
||||
flash_duration = box:get_setting(7)
|
||||
noflash_duration = box:get_setting(8)
|
||||
inter_repetition_delay = box:get_setting(9)
|
||||
inter_trial_delay = box:get_setting(10)
|
||||
send_toggle = _G[box:get_setting(11)]
|
||||
time_to_send = box:get_setting(13)
|
||||
n_tactilos = box:get_setting(3)
|
||||
n_repetitions = box:get_setting(4)
|
||||
n_trials = box:get_setting(5)
|
||||
flash_duration = box:get_setting(6)
|
||||
noflash_duration = box:get_setting(7)
|
||||
inter_repetition_delay = box:get_setting(8)
|
||||
inter_trial_delay = box:get_setting(9)
|
||||
send_toggle = _G[box:get_setting(10)]
|
||||
free_spelling = box:get_setting(11)
|
||||
time_to_send = box:get_setting(12)
|
||||
|
||||
if box:get_setting(12) == 'true' then
|
||||
free_spelling = true
|
||||
--Set number of trials to 1 in free spelling mode
|
||||
if free_spelling == 'true' then
|
||||
n_trials = 1
|
||||
else
|
||||
free_spelling = false
|
||||
n_trials = box:get_setting(6)
|
||||
end
|
||||
|
||||
--Lua variables
|
||||
@ -116,7 +114,7 @@ function process(box)
|
||||
|
||||
end
|
||||
|
||||
if not free_spelling then
|
||||
if free_spelling == 'false' then
|
||||
-- end experiment if set to copy spelling
|
||||
box:send_stimulation(1, OVTK_StimulationId_ExperimentStop ,box:get_current_time() , 0)
|
||||
send = false
|
||||
|
@ -10,14 +10,10 @@ function initialize(box)
|
||||
|
||||
math.randomseed(os.time())
|
||||
row_base = _G[box:get_setting(2)]
|
||||
col_base = _G[box:get_setting(3)]
|
||||
n_tactilos = box:get_setting(4)
|
||||
delay = box:get_setting(5)
|
||||
if box:get_setting(6) == 'true' then
|
||||
free_spelling = true
|
||||
else
|
||||
free_spelling = false
|
||||
end
|
||||
n_tactilos = box:get_setting(3)
|
||||
delay = box:get_setting(4)
|
||||
free_spelling = box:get_setting(5)
|
||||
|
||||
end
|
||||
|
||||
-- this function is called when the box is uninitialized
|
||||
@ -41,12 +37,11 @@ function process(box)
|
||||
-- gets stimulation
|
||||
stimulation_id, stimulation_time, stimulation_duration = box:get_stimulation(1, 1)
|
||||
|
||||
if not free_spelling then
|
||||
if free_spelling == 'false' then
|
||||
if stimulation_id == OVTK_StimulationId_RestStart then
|
||||
|
||||
-- triggers the target
|
||||
box:send_stimulation(1, row_base+math.random(1,n_tactilos)-1, t+delay, 0)
|
||||
box:send_stimulation(1, col_base, t+delay, 0)
|
||||
|
||||
elseif stimulation_id == OVTK_StimulationId_ExperimentStop then
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user