@@ -48,15 +48,15 @@ public static Boolean Initialize()
4848 {
4949 int boardId = Convert . ToInt32 ( connectForm . Settings . BoardId ) ;
5050 BrainFlowInputParams inputParams = new BrainFlowInputParams ( ) ;
51- inputParams . ip_address = connectForm . Settings . IpAddress ;
51+ inputParams . ip_address = connectForm . Settings . IpAddress ?? "" ;
5252 inputParams . ip_port = connectForm . Settings . IpPort ;
5353 inputParams . ip_protocol = connectForm . Settings . IpProtocol ;
54- inputParams . mac_address = connectForm . Settings . MacAddress ;
55- inputParams . serial_port = connectForm . Settings . SerialPort ;
56- inputParams . serial_number = connectForm . Settings . SerialNumber ;
54+ inputParams . mac_address = connectForm . Settings . MacAddress ?? "" ;
55+ inputParams . serial_port = connectForm . Settings . SerialPort ?? "" ;
56+ inputParams . serial_number = connectForm . Settings . SerialNumber ?? "" ;
5757 inputParams . timeout = connectForm . Settings . Timeout ;
58- inputParams . other_info = connectForm . Settings . OtherInfo ;
59- inputParams . file = connectForm . Settings . File ;
58+ inputParams . other_info = connectForm . Settings . OtherInfo ?? "" ;
59+ inputParams . file = connectForm . Settings . File ?? "" ;
6060
6161 boardThread = new Thread ( ( ) => GetBoardData ( boardId , inputParams ) ) ;
6262 boardThread . Start ( ) ;
@@ -87,7 +87,6 @@ static void GetBoardData(int board_id, BrainFlowInputParams input_params)
8787
8888 boardShim . prepare_session ( ) ;
8989 boardShim . start_stream ( ) ;
90- Thread . Sleep ( 640 ) ;
9190
9291 eegChannels = BoardShim . get_eeg_channels ( board_id ) ;
9392 eegValues = new double [ eegChannels . Length ] ;
0 commit comments