Comparar commits
9 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| b228461253 | |||
| 059a9361a9 | |||
| d48df5a5ad | |||
| 2e9e78ab32 | |||
| fe88c989e4 | |||
| 04f20ed19b | |||
| d34c9dc2a0 | |||
| f98ffefebf | |||
| 8293b9d351 |
@@ -1,8 +1,21 @@
|
||||
# 2.1.2
|
||||
|
||||
### Bug Fixes
|
||||
* Fix #120 - Locale dependent formatting cause issue with output ODF file.
|
||||
|
||||
# 2.1.1
|
||||
|
||||
### Bug Fixes
|
||||
* Fix #111 - No compatible USB now shows error in output, not an annoying popup.
|
||||
|
||||
# 2.1.0
|
||||
|
||||
### Breaking Changes
|
||||
* Removed space in GanglionHub to be able to kill the hub on windows.
|
||||
|
||||
### Bug Fixes
|
||||
* Issue #111 where Windows users saw error message from Ganglion Hub on start up if no hub selected.
|
||||
|
||||
# 2.0.0
|
||||
|
||||
* Initial Release
|
||||
|
||||
@@ -144,6 +144,10 @@ public void controlEvent(ControlEvent theEvent) {
|
||||
chanButton16.color_notPressed = autoFileName.color_notPressed; //default color of button
|
||||
} else if(newDataSource == DATASOURCE_GANGLION){
|
||||
updateToNChan(4);
|
||||
if (isWindows() && isHubInitialized == false) {
|
||||
hubInit();
|
||||
timeOfSetup = millis();
|
||||
}
|
||||
} else if(newDataSource == DATASOURCE_PLAYBACKFILE){
|
||||
updateToNChan(8);
|
||||
} else if(newDataSource == DATASOURCE_SYNTHETIC){
|
||||
@@ -377,7 +381,7 @@ class ControlPanel {
|
||||
convertSDFile();
|
||||
}
|
||||
|
||||
if (isGanglion) {
|
||||
if (isHubInitialized && isGanglionObjectInitialized) {
|
||||
if (!calledForBLEList) {
|
||||
calledForBLEList = true;
|
||||
if (ganglion.isHubRunning()) {
|
||||
@@ -950,9 +954,13 @@ class ControlPanel {
|
||||
|
||||
//open or close serial port if serial port button is pressed (left button in serial widget)
|
||||
if (refreshBLE.isMouseHere() && refreshBLE.wasPressed) {
|
||||
output("BLE Devices Refreshing");
|
||||
bleList.items.clear();
|
||||
ganglion.searchDeviceStart();
|
||||
if (isGanglionObjectInitialized) {
|
||||
output("BLE Devices Refreshing");
|
||||
bleList.items.clear();
|
||||
ganglion.searchDeviceStart();
|
||||
} else {
|
||||
output("Please wait till BLE is fully initalized");
|
||||
}
|
||||
}
|
||||
|
||||
//open or close serial port if serial port button is pressed (left button in serial widget)
|
||||
|
||||
@@ -87,9 +87,9 @@ void openNewLogFileODF(String _fileName) {
|
||||
*/
|
||||
void playbackSelected(File selection) {
|
||||
if (selection == null) {
|
||||
println("ControlPanel: playbackSelected: Window was closed or the user hit cancel.");
|
||||
println("DataLogging: playbackSelected: Window was closed or the user hit cancel.");
|
||||
} else {
|
||||
println("ControlPanel: playbackSelected: User selected " + selection.getAbsolutePath());
|
||||
println("DataLogging: playbackSelected: User selected " + selection.getAbsolutePath());
|
||||
output("You have selected \"" + selection.getAbsolutePath() + "\" for playback.");
|
||||
playbackData_fname = selection.getAbsolutePath();
|
||||
}
|
||||
@@ -135,7 +135,7 @@ void fileSelected(File selection) { //called by the Open File dialog box after
|
||||
println("fileSelected: no selection so far...");
|
||||
} else {
|
||||
//inputFile = selection;
|
||||
playbackData_fname = selection.getAbsolutePath();
|
||||
playbackData_fname = selection.getAbsolutePath(); //<>//
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public class OutputFile_rawtxt {
|
||||
int nVal = values.length;
|
||||
for (int Ival = 0; Ival < nVal; Ival++) {
|
||||
output.print(", ");
|
||||
output.print(String.format("%.2f", scale_fac * float(values[Ival])));
|
||||
output.print(String.format(Locale.US, "%.2f", scale_fac * float(values[Ival])));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ public class OutputFile_rawtxt {
|
||||
int nVal = values.length;
|
||||
for (int Ival = 0; Ival < nVal; Ival++) {
|
||||
output.print(", ");
|
||||
output.print(String.format("%.3f", scale_fac * float(values[Ival])));
|
||||
output.print(String.format(Locale.US, "%.3f", scale_fac * float(values[Ival])));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1475,4 +1475,4 @@ public void convertSDFile() {
|
||||
dataWriter.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,6 +83,7 @@ class OpenBCI_Ganglion {
|
||||
|
||||
final static int RESP_ERROR_UNKNOWN = 499;
|
||||
final static int RESP_ERROR_BAD_PACKET = 500;
|
||||
final static int RESP_ERROR_BAD_NOBLE_START = 501;
|
||||
final static int RESP_ERROR_ALREADY_CONNECTED = 408;
|
||||
final static int RESP_ERROR_COMMAND_NOT_RECOGNIZED = 406;
|
||||
final static int RESP_ERROR_DEVICE_NOT_FOUND = 405;
|
||||
@@ -268,11 +269,7 @@ class OpenBCI_Ganglion {
|
||||
println("OpenBCI_Ganglion: Log: " + list[1]);
|
||||
break;
|
||||
case 'q':
|
||||
if (waitingForResponse) {
|
||||
waitingForResponse = false;
|
||||
println("Node process up!");
|
||||
}
|
||||
println("OpenBCI_Ganglion: Status: 200");
|
||||
processStatus(msg);
|
||||
break;
|
||||
default:
|
||||
println("OpenBCI_Ganglion: parseMessage: default: " + msg);
|
||||
@@ -422,6 +419,21 @@ class OpenBCI_Ganglion {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processStatus(String msg) {
|
||||
String[] list = split(msg, ',');
|
||||
int code = Integer.parseInt(list[1]);
|
||||
if (waitingForResponse) {
|
||||
waitingForResponse = false;
|
||||
println("Node process up!");
|
||||
}
|
||||
if (code == RESP_ERROR_BAD_NOBLE_START) {
|
||||
println("OpenBCI_Ganglion: processStatus: Problem in the Hub");
|
||||
output("Problem starting Ganglion Hub. Please make sure compatible USB is configured, then restart this GUI.");
|
||||
} else {
|
||||
println("OpenBCI_Ganglion: processStatus: Started Successfully");
|
||||
}
|
||||
}
|
||||
|
||||
private void processScan(String msg) {
|
||||
String[] list = split(msg, ',');
|
||||
@@ -706,4 +718,4 @@ class OpenBCI_Ganglion {
|
||||
controlPanel.open();
|
||||
output("Ganglion now in bootloader mode! Enjoy!");
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -230,7 +230,8 @@ int indices = 0;
|
||||
boolean synthesizeData = false;
|
||||
|
||||
int timeOfSetup = 0;
|
||||
boolean isGanglion = false;
|
||||
boolean isHubInitialized = false;
|
||||
boolean isGanglionObjectInitialized = false;
|
||||
color bgColor = color(1, 18, 41);
|
||||
color openbciBlue = color(31, 69, 110);
|
||||
int COLOR_SCHEME_DEFAULT = 1;
|
||||
@@ -255,9 +256,12 @@ void setup() {
|
||||
// server on shut down of this app, the main process.
|
||||
// prepareExitHandler();
|
||||
if (dev == false) {
|
||||
if (!isWindows()) hubStop(); //kill any existing hubs before starting a new one..
|
||||
hubStart();
|
||||
prepareExitHandler();
|
||||
// On windows wait to start the hub until Ganglion is clicked on in the control panel.
|
||||
// See issue #111
|
||||
hubStop(); //kill any existing hubs before starting a new one..
|
||||
if (!isWindows()) {
|
||||
hubInit();
|
||||
}
|
||||
}
|
||||
|
||||
println("Welcome to the Processing-based OpenBCI GUI!"); //Welcome line.
|
||||
@@ -391,6 +395,15 @@ private void prepareExitHandler () {
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the hub and sets prepares the exit handler.
|
||||
*/
|
||||
void hubInit() {
|
||||
isHubInitialized = true;
|
||||
hubStart();
|
||||
prepareExitHandler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the node hub working, tested on mac and windows.
|
||||
*/
|
||||
@@ -709,10 +722,10 @@ void haltSystem() {
|
||||
|
||||
void systemUpdate() { // for updating data values and variables
|
||||
|
||||
if (millis() - timeOfSetup >= 1000 && isGanglion == false) {
|
||||
if (isHubInitialized && isGanglionObjectInitialized == false && millis() - timeOfSetup >= 1500) {
|
||||
ganglion = new OpenBCI_Ganglion(this);
|
||||
println("Instantiating Ganglion object...");
|
||||
isGanglion = true;
|
||||
isGanglionObjectInitialized = true;
|
||||
}
|
||||
|
||||
//update the sync state with the OpenBCI hardware
|
||||
@@ -966,7 +979,7 @@ void introAnimation() {
|
||||
textLeading(24);
|
||||
fill(31, 69, 110, transparency);
|
||||
textAlign(CENTER, CENTER);
|
||||
text("OpenBCI GUI v2.1.0\nJanuary 2017", width/2, height/2 + width/9);
|
||||
text("OpenBCI GUI v2.1.2\nJanuary 2017", width/2, height/2 + width/9);
|
||||
}
|
||||
|
||||
//exit intro animation at t2
|
||||
|
||||
@@ -93,7 +93,7 @@ class W_ganglionImpedance extends Widget {
|
||||
popStyle();
|
||||
}
|
||||
|
||||
if(isGanglion && eegDataSource == DATASOURCE_GANGLION){
|
||||
if(isHubInitialized && isGanglionObjectInitialized && eegDataSource == DATASOURCE_GANGLION){
|
||||
if(ganglion.isCheckingImpedance()){
|
||||
image(loadingGIF_blue, x + padding + startStopCheck.but_dx + 15, y + padding - 8, 40, 40);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class W_ganglionImpedance extends Widget {
|
||||
|
||||
//put your code here...
|
||||
if(startStopCheck.isActive && startStopCheck.isMouseHere()){
|
||||
if(isGanglion && eegDataSource == DATASOURCE_GANGLION){
|
||||
if(isHubInitialized && isGanglionObjectInitialized && eegDataSource == DATASOURCE_GANGLION){
|
||||
if(ganglion.isCheckingImpedance()){
|
||||
ganglion.impedanceStop();
|
||||
startStopCheck.but_txt = "Start Impedance Check";
|
||||
|
||||
+1
-5
@@ -2,8 +2,4 @@ Project Management Plan:
|
||||
[](http://waffle.io/OpenBCI/OpenBCI_GUI_v2.0)
|
||||
|
||||
# OpenBCI_GUI_v2.0
|
||||
Based on OpenBCI_Processing, OpenBCI_GUI_v2.0 extends the GUI to include additional features, and will soon be usable with the Ganglion board.
|
||||
|
||||
## Developing
|
||||
|
||||
Drag and drop all folders in the libraries folder into your processing libraries folder.
|
||||
Based on OpenBCI_Processing, OpenBCI_GUI_v2.0 extends the GUI to include additional features, and interfaces with the OpenBCI [Cyton](http://shop.openbci.com/collections/frontpage/products/openbci-32-bit-board-kit?variant=784651699) and [Ganglion](http://shop.openbci.com/collections/frontpage/products/pre-order-ganglion-board?variant=13461804483) hardware systems. Tutorials, and getting started guides can be found on the [OpenBCI Learning Pages](http://docs.openbci.com/Getting%20Started/00-Welcome). For a guide on how to run this code in the Processing IDE, go [here](http://docs.openbci.com/OpenBCI%20Software/01-OpenBCI_GUI)
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário