Commit 85a5fecd authored by Jussi Lindgren's avatar Jussi Lindgren

Merge branch 'integration-1.1' of...

Merge branch 'integration-1.1' of git+ssh://scm.gforge.inria.fr//gitroot/openvibe/openvibe into integration-1.1
parents 36704663 e08ce439
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<TypeIdentifier>(0xb0d0db45, 0x49cbc34a)</TypeIdentifier> <TypeIdentifier>(0xb0d0db45, 0x49cbc34a)</TypeIdentifier>
<Name>Lua Script</Name> <Name>Lua Script</Name>
<DefaultValue></DefaultValue> <DefaultValue></DefaultValue>
<Value>/home/gserrier/openvibe/dist/share/openvibe/scenarios/bci-examples/motor-imagery-CSP/motor-imagery-bci-epoch-selector.lua</Value> <Value>${Player_ScenarioDirectory}/motor-imagery-bci-epoch-selector.lua</Value>
<Modifiability>false</Modifiability> <Modifiability>false</Modifiability>
</Setting> </Setting>
<Setting> <Setting>
...@@ -520,7 +520,7 @@ ...@@ -520,7 +520,7 @@
</Attribute> </Attribute>
<Attribute> <Attribute>
<Identifier>(0x8d21ff41, 0xdf6afe7e)</Identifier> <Identifier>(0x8d21ff41, 0xdf6afe7e)</Identifier>
<Value>/home/gserrier/openvibe/dist/share/openvibe/scenarios/bci-examples/motor-imagery-CSP/csp-spatial-filter.cfg</Value> <Value>${Player_ScenarioDirectory}/csp-spatial-filter.cfg</Value>
</Attribute> </Attribute>
<Attribute> <Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier> <Identifier>(0xad100179, 0xa3c984ab)</Identifier>
...@@ -530,6 +530,10 @@ ...@@ -530,6 +530,10 @@
<Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier> <Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier>
<Value>(0x00000000, 0x000e27e3)</Value> <Value>(0x00000000, 0x000e27e3)</Value>
</Attribute> </Attribute>
<Attribute>
<Identifier>(0xc67a01dc, 0x28ce06c1)</Identifier>
<Value></Value>
</Attribute>
<Attribute> <Attribute>
<Identifier>(0xc80ce8af, 0xf699f813)</Identifier> <Identifier>(0xc80ce8af, 0xf699f813)</Identifier>
<Value>1</Value> <Value>1</Value>
......
<OpenViBE-SettingsOverride>
<SettingValue>2.693394e-001 -2.082757e-001 2.391615e-001 2.344401e-001 3.927157e-001 2.381559e-001 1.105450e-001 5.748063e-001 3.098411e-001 2.888676e-001 1.972432e-001 -2.803966e-001 8.610541e-002 -2.669093e-001 -2.873429e-001 -3.080204e-001 -2.313958e-001 -3.049153e-001 -3.205304e-001 -4.424281e-001 -2.981316e-001 -3.624890e-001 -2.713850e-002 -7.049823e-001 -1.550608e-002 -1.321822e-001 1.119925e-001 1.023369e-002 5.826165e-002 -2.615791e-001 -2.637424e-001 -3.941850e-001 4.185020e-001 1.442614e-001 3.069018e-001 3.027673e-001 3.956899e-001 2.814762e-001 2.776705e-001 3.540791e-001 2.828738e-001 3.027926e-001 3.106658e-001 2.946954e-001 8.165735e-001 3.035239e-001 1.979707e-001 2.325919e-001 1.767888e-001 -1.389007e-001 -2.142701e-001 6.029197e-002 1.522051e-001 1.241781e-001 9.543869e-002 2.155692e-001 2.680507e-001 3.076862e-001 3.604533e-001 3.075757e-001 2.513993e-001 2.252315e-001 3.295531e-001 2.891706e-001 4.002560e-001 3.100291e-001 </SettingValue>
<SettingValue>6</SettingValue>
<SettingValue>11</SettingValue>
</OpenViBE-SettingsOverride>
g_offset = nil
g_duration = nil
-- this function is called when the box is initialized
function initialize(box)
dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua")
g_offset = box:get_setting(2)
g_duration = box:get_setting(3)
end
-- this function is called when the box is uninitialized
function uninitialize(box)
end
function wait_until(box, time)
while box:get_current_time() < time do
box:sleep()
end
end
function wait_for(box, duration)
wait_until(box, box:get_current_time() + duration)
end
function process(box)
-- loops on every received stimulation for a given input
while box:keep_processing() do
for stimulation = 1, box:get_stimulation_count(1) do
-- gets the received stimulation
identifier, date, duration = box:get_stimulation(1, 1)
-- discards it
box:remove_stimulation(1, 1)
-- delay the OVTK_GDF_Left and Right
if identifier == OVTK_GDF_Left or identifier == OVTK_GDF_Right then
box:send_stimulation(1, OVTK_GDF_Correct, date+g_offset, 0)
box:send_stimulation(1, OVTK_GDF_Incorrect, date+g_offset+g_duration, 0)
end
end
box:sleep()
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment