Browse Source

Dateien hochladen nach „scenarios/scripts“

master
Tobias Baumann 2 years ago
parent
commit
ede95d81d5

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

--load box settings --load box settings
row_base = _G[box:get_setting(2)] row_base = _G[box:get_setting(2)]
col_base = _G[box:get_setting(3)] col_base = _G[box:get_setting(3)]
n_rows = box:get_setting(4)
n_tactilos = box:get_setting(4)
n_repetitions = box:get_setting(5) n_repetitions = box:get_setting(5)
flash_duration = box:get_setting(7) flash_duration = box:get_setting(7)
noflash_duration = box:get_setting(8) noflash_duration = box:get_setting(8)
send = false send = false
experiment_end = false experiment_end = false
tactilo_stimcodes = {} tactilo_stimcodes = {}
for x = 1, n_rows do
for x = 1, n_tactilos do
tactilo_stimcodes[x] = row_base + x - 1 tactilo_stimcodes[x] = row_base + x - 1
end end
end end

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

dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua") dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua")
math.randomseed(os.time()) math.randomseed(os.time())
row_base = _G[box:get_setting(2)]
col_base = _G[box:get_setting(3)]
delay = box:get_setting(4)
if box:get_setting(5) == 'true' then
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 free_spelling = true
else else
free_spelling = false free_spelling = false
if stimulation_id == OVTK_StimulationId_RestStart then if stimulation_id == OVTK_StimulationId_RestStart then
-- triggers the target -- triggers the target
box:send_stimulation(1, row_base+math.random(1,6)-1, t+delay, 0)
box:send_stimulation(1, row_base+math.random(1,n_tactilos)-1, t+delay, 0)
box:send_stimulation(1, col_base, t+delay, 0) box:send_stimulation(1, col_base, t+delay, 0)
elseif stimulation_id == OVTK_StimulationId_ExperimentStop then elseif stimulation_id == OVTK_StimulationId_ExperimentStop then

Loading…
Cancel
Save