Browse Source

Dateien hochladen nach „scenarios/scripts“

master
Tobias Baumann 2 years ago
parent
commit
e2d2bba1f7

+ 14
- 16
scenarios/scripts/p300-tactile-stimulator.lua View File

@@ -49,23 +49,21 @@ function initialize(box)
dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua")
--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)
row_base = _G[box:get_setting(2)]
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

+ 6
- 11
scenarios/scripts/p300-tactile-target.lua View File

@@ -9,15 +9,11 @@ function initialize(box)
dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua")
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
row_base = _G[box:get_setting(2)]
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…
Cancel
Save