Skip to content

Commit 52a72b1

Browse files
committed
Fix initialization
1 parent 37baad6 commit 52a72b1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

BrainFlow/PluginHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Threading;
33
using System.Windows.Forms;
4-
using System.Drawing;
54
using brainflow;
65
using brainflow.math;
76

@@ -71,6 +70,8 @@ public static Boolean Initialize()
7170

7271
boardThread = new Thread(() => GetBoardData(boardId, inputParams));
7372
boardThread.Start();
73+
74+
Initialized = true;
7475
}
7576
catch (Exception ex)
7677
{
@@ -103,8 +104,6 @@ static void GetBoardData(int board_id, BrainFlowInputParams input_params)
103104
eegTicks = new double[eegChannels.Length];
104105
clearValues = new bool[eegChannels.Length];
105106

106-
Initialized = true;
107-
108107
do
109108
{
110109
double[,] unprocessed_data = boardShim.get_board_data(20);

0 commit comments

Comments
 (0)