Skip to content

Commit

Permalink
Merge pull request #23 from Emotiv/COR-5044-BrainViz-v3.6.9-plugin
Browse files Browse the repository at this point in the history
COR-5044-show-error-message-on-brainviz
  • Loading branch information
hoangphamemotiv authored Sep 26, 2023
2 parents b54987e + 6e466d4 commit e00fda7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Src/DataStreamManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,11 @@ public ConnectToCortexStates GetConnectToCortexState()
return _dsProcess.GetConnectToCortexState();
}

public string GetConnectToCortexWarningMessage()
{
return _dsProcess.GetConnectToCortexWarningMessage();
}

//=== Device data ===
/// <summary>
/// Get battery level.
Expand Down
4 changes: 4 additions & 0 deletions Src/DataStreamProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class DataStreamProcess
private SessionHandler _sessionHandler = SessionHandler.Instance;

ConnectToCortexStates _connectCortexState = ConnectToCortexStates.Service_connecting;
string _connectCortexWarningMessage = "";

// Event
public event EventHandler<ArrayList> MotionDataReceived; // motion data
Expand Down Expand Up @@ -73,6 +74,8 @@ public event EventHandler<bool> BTLEPermissionGrantedNotify

public ConnectToCortexStates GetConnectToCortexState() => _connectCortexState;

public string GetConnectToCortexWarningMessage() => _connectCortexWarningMessage;

// Constructor
public DataStreamProcess()
{
Expand Down Expand Up @@ -302,6 +305,7 @@ private void MessageErrorRecieved(object sender, ErrorMsgEventArgs errorInfo)
_sessionHandler.ClearSessionData();
CreateSessionFail(this, message);
}
_connectCortexWarningMessage = message;
// ErrorNotify(this, message);
}

Expand Down

0 comments on commit e00fda7

Please sign in to comment.