Skip to content

Commit 24bd916

Browse files
committed
Attach Cyton Auto-Connect to Start Session button when serial mode is selected
1 parent e46b3c4 commit 24bd916

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

OpenBCI_GUI/ControlPanel.pde

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,25 +3089,26 @@ class InitBox {
30893089
public void initButtonPressed() {
30903090
if (getInitSessionButtonText().equals("START SESSION")) {
30913091
if ((eegDataSource == DATASOURCE_CYTON && selectedProtocol == BoardProtocol.NONE) || (eegDataSource == DATASOURCE_GANGLION && selectedProtocol == BoardProtocol.NONE)) {
3092-
output("No Transfer Protocol selected. Please select your Transfer Protocol and retry system initiation.");
3092+
outputWarn("No Transfer Protocol selected. Please select your Transfer Protocol and retry system initiation.");
30933093
return;
30943094
} else if (eegDataSource == DATASOURCE_CYTON && selectedProtocol == BoardProtocol.SERIAL && openBCI_portName == "N/A") { //if data source == normal && if no serial port selected OR no SD setting selected
3095-
output("No Serial/COM port selected. Please select your Serial/COM port and retry system initiation.");
3095+
outputWarn("No Serial/COM port selected. Attempting to AUTO-CONNECT to Cyton.");
3096+
controlPanel.comPortBox.attemptAutoConnectCyton();
30963097
return;
30973098
} else if (eegDataSource == DATASOURCE_CYTON && selectedProtocol == BoardProtocol.WIFI && wifi_portName == "N/A" && controlPanel.getWifiSearchStyle() == controlPanel.WIFI_DYNAMIC) {
3098-
output("No Wifi Shield selected. Please select your Wifi Shield and retry system initiation.");
3099+
outputWarn("No Wifi Shield selected. Please select your Wifi Shield and retry system initiation.");
30993100
return;
31003101
} else if (eegDataSource == DATASOURCE_PLAYBACKFILE && playbackData_fname == "N/A" && sdData_fname == "N/A") { //if data source == playback && playback file == 'N/A'
3101-
output("No playback file selected. Please select a playback file and retry system initiation."); // tell user that they need to select a file before the system can be started
3102+
outputWarn("No playback file selected. Please select a playback file and retry system initiation."); // tell user that they need to select a file before the system can be started
31023103
return;
31033104
} else if (eegDataSource == DATASOURCE_GANGLION && (selectedProtocol == BoardProtocol.BLE || selectedProtocol == BoardProtocol.BLED112) && ganglion_portName == "N/A") {
3104-
output("No BLE device selected. Please select your Ganglion device and retry system initiation.");
3105+
outputWarn("No BLE device selected. Please select your Ganglion device and retry system initiation.");
31053106
return;
31063107
} else if (eegDataSource == DATASOURCE_GANGLION && selectedProtocol == BoardProtocol.WIFI && wifi_portName == "N/A" && controlPanel.getWifiSearchStyle() == controlPanel.WIFI_DYNAMIC) {
3107-
output("No Wifi Shield selected. Please select your Wifi Shield and retry system initiation.");
3108+
outputWarn("No Wifi Shield selected. Please select your Wifi Shield and retry system initiation.");
31083109
return;
31093110
} else if (eegDataSource == -1) {//if no data source selected
3110-
output("No DATA SOURCE selected. Please select a DATA SOURCE and retry system initiation.");//tell user they must select a data source before initiating system
3111+
outputWarn("No DATA SOURCE selected. Please select a DATA SOURCE and retry system initiation.");//tell user they must select a data source before initiating system
31113112
return;
31123113
} else { //otherwise, initiate system!
31133114
//verbosePrint("ControlPanel: CPmouseReleased: init");

OpenBCI_GUI/RadioConfig.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class RadioConfig {
333333
return false;
334334
}
335335
} else {
336-
output("No Serial/COM port selected. Please select your Serial/COM port and retry");
336+
outputWarn("No Serial/COM port selected. Please select your Serial/COM port and retry.");
337337
rcConfig.print_onscreen("Select a Serial/COM port, then try again.");
338338
return false;
339339
}
@@ -364,7 +364,7 @@ class RadioConfig {
364364
return false;
365365
}
366366
} else {
367-
output("No Serial/COM port selected. Please select your Serial/COM port and retry");
367+
outputWarn("No Serial/COM port selected. Please select your Serial/COM port and retry.");
368368
return false;
369369
}
370370
}

0 commit comments

Comments
 (0)