init
This commit is contained in:
+1521
File diff suppressed because it is too large
Load Diff
+30
@@ -0,0 +1,30 @@
|
||||
|
||||
sent = false
|
||||
|
||||
function initialize(box)
|
||||
dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua")
|
||||
sent = false;
|
||||
end
|
||||
|
||||
function uninitialize(box)
|
||||
end
|
||||
|
||||
function process(box)
|
||||
|
||||
while box:keep_processing() and sent == false do
|
||||
|
||||
current_time = box:get_current_time() + 1
|
||||
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_01, current_time, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_02, current_time+10, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_03, current_time+20, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_ExperimentStop, current_time+30, 0)
|
||||
|
||||
sent = true
|
||||
|
||||
box:sleep()
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+1685
File diff suppressed because it is too large
Load Diff
+28
@@ -0,0 +1,28 @@
|
||||
<OpenViBE-Classifier-Box FormatVersion="4">
|
||||
<Strategy-Identifier class-id="(0xffffffff, 0xffffffff)">Native</Strategy-Identifier>
|
||||
<Algorithm-Identifier class-id="(0x2ba17a3c, 0x1bd46d84)">Linear Discrimimant Analysis (LDA)</Algorithm-Identifier>
|
||||
<Stimulations>
|
||||
<Class-Stimulation class-id="0">OVTK_StimulationId_Label_01</Class-Stimulation>
|
||||
<Class-Stimulation class-id="1">OVTK_StimulationId_Label_02</Class-Stimulation>
|
||||
<Class-Stimulation class-id="2">OVTK_StimulationId_Label_03</Class-Stimulation>
|
||||
</Stimulations>
|
||||
<OpenViBE-Classifier>
|
||||
<LDA version="1">
|
||||
<Classes>0 1 2 </Classes>
|
||||
<Class-config-list>
|
||||
<Class-config>
|
||||
<Weights> 1.420580e+002 1.407747e+002 1.515542e+002 1.064545e+002</Weights>
|
||||
<Bias>-3949.05</Bias>
|
||||
</Class-config>
|
||||
<Class-config>
|
||||
<Weights> 1.396979e+002 1.432478e+002 1.514010e+002 1.063725e+002</Weights>
|
||||
<Bias>-3947.23</Bias>
|
||||
</Class-config>
|
||||
<Class-config>
|
||||
<Weights> 1.396863e+002 1.410456e+002 1.539364e+002 1.070348e+002</Weights>
|
||||
<Bias>-3961.82</Bias>
|
||||
</Class-config>
|
||||
</Class-config-list>
|
||||
</LDA>
|
||||
</OpenViBE-Classifier>
|
||||
</OpenViBE-Classifier-Box>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
|
||||
sent = false
|
||||
|
||||
function initialize(box)
|
||||
dofile(box:get_config("${Path_Data}") .. "/plugins/stimulation/lua-stimulator-stim-codes.lua")
|
||||
sent = false;
|
||||
end
|
||||
|
||||
function uninitialize(box)
|
||||
end
|
||||
|
||||
function process(box)
|
||||
|
||||
while box:keep_processing() and sent == false do
|
||||
|
||||
current_time = box:get_current_time() + 1
|
||||
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_01, current_time, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_02, current_time+4, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_03, current_time+8, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_02, current_time+12, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_01, current_time+16, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_03, current_time+20, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_01, current_time+24, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_02, current_time+28, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_03, current_time+32, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_03, current_time+36, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_02, current_time+40, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_Label_01, current_time+44, 0)
|
||||
box:send_stimulation(1, OVTK_StimulationId_ExperimentStop, current_time+48, 0)
|
||||
|
||||
sent = true
|
||||
|
||||
box:sleep()
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+1979
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user