From ede95d81d53d7559a39e0518985644ef5cbced50 Mon Sep 17 00:00:00 2001 From: Tobias Baumann Date: Fri, 6 May 2022 11:57:27 +0000 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9Escenarios?= =?UTF-8?q?/scripts=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenarios/scripts/p300-tactile-stimulator.lua | 4 ++-- scenarios/scripts/p300-tactile-target.lua | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scenarios/scripts/p300-tactile-stimulator.lua b/scenarios/scripts/p300-tactile-stimulator.lua index 2796393..9f8e4e3 100644 --- a/scenarios/scripts/p300-tactile-stimulator.lua +++ b/scenarios/scripts/p300-tactile-stimulator.lua @@ -51,7 +51,7 @@ function initialize(box) --load box settings row_base = _G[box:get_setting(2)] 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) flash_duration = box:get_setting(7) noflash_duration = box:get_setting(8) @@ -72,7 +72,7 @@ function initialize(box) send = false experiment_end = false tactilo_stimcodes = {} - for x = 1, n_rows do + for x = 1, n_tactilos do tactilo_stimcodes[x] = row_base + x - 1 end end diff --git a/scenarios/scripts/p300-tactile-target.lua b/scenarios/scripts/p300-tactile-target.lua index b6473b0..28967ff 100644 --- a/scenarios/scripts/p300-tactile-target.lua +++ b/scenarios/scripts/p300-tactile-target.lua @@ -9,10 +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)] - 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 else free_spelling = false @@ -44,7 +45,7 @@ function process(box) if stimulation_id == OVTK_StimulationId_RestStart then -- 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) elseif stimulation_id == OVTK_StimulationId_ExperimentStop then