@@ -64,7 +64,7 @@ class W_Networking extends Widget {
6464 private int comPortToSave;
6565 private String defaultBaud;
6666
67- public LinkedList<String > protocols = new LinkedList<String > (Arrays . asList(" Serial " , " LSL" , " UDP " , " OSC " ));
67+ public LinkedList<String > protocols = new LinkedList<String > (Arrays . asList(" UDP " , " LSL" , " OSC " , " Serial " ));
6868 public LinkedList<String > dataTypes = new LinkedList<String > (Arrays . asList(" None" , " Focus" , " EMG" , " AvgBandPower" ,
6969 " TimeSeriesFilt" , " TimeSeriesRaw" , " Accel/Aux" , " Pulse" , " BandPower" , " FFT" ));
7070 public LinkedList<String > baudRates = new LinkedList<String > (Arrays . asList(" 57600" , " 115200" , " 250000" , " 500000" ));
@@ -124,11 +124,12 @@ class W_Networking extends Widget {
124124 if (eegDataSource != DATASOURCE_CYTON ) {
125125 dataTypes. remove(" Pulse" );
126126 }
127- defaultBaud = " 57600 " ;
127+
128128 protocolMode = " UDP" ; // Set Default to UDP
129- protocolIndex = 2 ; // Set Default to UDP
129+ protocolIndex = 0 ; // Set Default to UDP
130130 addDropdown(" Protocol" , " Protocol" , protocols, protocolIndex);
131131 serialNetworkingComPorts = new ArrayList<String > (getComPorts());
132+ defaultBaud = " 57600" ;
132133 verbosePrint(" serialNetworkingComPorts = " + serialNetworkingComPorts);
133134 comPortToSave = 0 ;
134135
@@ -2062,13 +2063,13 @@ class Stream extends Thread {
20622063 */
20632064public void Protocol (int protocolIndex ) {
20642065 settings. nwProtocolSave = protocolIndex;
2065- if (protocolIndex == 3 ) {
2066- w_networking. protocolMode = " OSC" ;
2067- } else if (protocolIndex == 2 ) {
2066+ if (protocolIndex == 0 ) {
20682067 w_networking. protocolMode = " UDP" ;
20692068 } else if (protocolIndex == 1 ) {
20702069 w_networking. protocolMode = " LSL" ;
2071- } else if (protocolIndex == 0 ) {
2070+ } else if (protocolIndex == 2 ) {
2071+ w_networking. protocolMode = " OSC" ;
2072+ } else if (protocolIndex == 3 ) {
20722073 w_networking. protocolMode = " Serial" ;
20732074 w_networking. disableCertainOutputs(
20742075 (int ) w_networking. cp5_networking_dropdowns. get(ScrollableList . class, " dataType1" ). getValue());
0 commit comments