Skip to content

Commit a203a16

Browse files
authored
Merge pull request #1047 from OpenBCI/development
GUI 5.1.0-beta.1
2 parents f0c9644 + 60d29ad commit a203a16

275 files changed

Lines changed: 72714 additions & 50556 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
branches:
1414
only:
1515
- master
16+
- development
1617

1718
before_install:
1819
- if [ "$TRAVIS_OS_NAME" = osx ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then openssl aes-256-cbc -K $encrypted_2f5d2771e3cb_key -iv $encrypted_2f5d2771e3cb_iv -in release_script/mac_only/Certificates.p12.enc -out release_script/mac_only/Certificates.p12 -d; fi
@@ -28,16 +29,16 @@ install:
2829
- mkdir $TRAVIS_BUILD_DIR/temp; cd $TRAVIS_BUILD_DIR/temp
2930

3031
### ### LINUX ### ###
31-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -O -L --insecure https://download.processing.org/processing-3.5.3-linux64.tgz ;fi
32-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then tar -xzvf processing-3.5.3-linux64.tgz ;fi
32+
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -O -L --insecure https://github.com/processing/processing/releases/download/processing-0269-3.5.3/processing-3.5.3-linux64.tgz ;fi
33+
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then tar -xzvf processing-3.5.3-linux64.tgz ;fi
3334
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export PATH=$TRAVIS_BUILD_DIR/temp/processing-3.5.3:$PATH ;fi
3435
# copy libraries to linux location
3536
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then mkdir -p $HOME/sketchbook/libraries/ ;fi
3637
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cp -a $TRAVIS_BUILD_DIR/OpenBCI_GUI/libraries/. $HOME/sketchbook/libraries/ ;fi
3738

3839
### ### MAC ### ###
39-
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl -O -L --insecure https://download.processing.org/processing-3.5.3-macosx.zip ;fi
40-
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then unzip processing-3.5.3-macosx.zip ;fi
40+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl -O -L --insecure https://github.com/processing/processing/releases/download/processing-0269-3.5.3/processing-3.5.3-macosx.zip ;fi
41+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then unzip processing-3.5.3-macosx.zip ;fi
4142
# Processing.app must be in this location for processing-java to work
4243
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mv Processing.app /Applications/Processing.app ;fi
4344
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH=$TRAVIS_BUILD_DIR/release_script/mac_only:$PATH ;fi

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# v5.1.0
2+
3+
### Bug Fixes
4+
* Stop data stream when no data received after 5 seconds #1011
5+
* Revisit Ganglion Impedance widget so it behaves like new Cyton Impedance Widget #1021
6+
* Fix dropdown backgrounds in Networking Widget
7+
* Update priveleges for Windows users and check if GUI has been run as Administrator
8+
9+
### Improvements
10+
* Add new FilterUI to allow custom filters per channel #988
11+
* Add BrainFlow Streamer for File and Network to Control Panel #1007
12+
* Update to BrainFlow v4.9.0+ and print version to console log #1028
13+
* Update OpenBCI Logo #1010
14+
* Clarify Cyton Smoothing feature #1027
15+
* Set Cyton Smoothing on by default and increase communication with a popup and additional Help button #1026
16+
* Update help text for various buttons across the GUI to help new and existing users
17+
* Update Band Power widget and add Average Band Power data type to Networking Widget
18+
* Update ControlP5 Library to 2.3.3 and change ScrollableList behavior to be more consistent with other front-end libraries
19+
* Remove old multi-line filter buttons in TopNav that draw incorrectly on some PCs #1013
20+
121
# v5.0.9
222

323
### Bug Fixes

OpenBCI_GUI/ADS1299SettingsController.pde

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ADS1299SettingsController {
9494
textFieldIsActive = true;
9595
}
9696

97-
copyPaste.checkForCopyPaste(customCommandTF);
97+
textfieldUpdateHelper.checkTextfield(customCommandTF);
9898
}
9999

100100
public void draw() {
@@ -311,14 +311,14 @@ class ADS1299SettingsController {
311311
private ScrollableList createDropdown(int chanNum, String name, ADSSettingsEnum[] enumValues, ADSSettingsEnum e, color _backgroundColor) {
312312
int dropdownW = int((w - (spaceBetweenButtons*6)) / 5);
313313
int dropdownH = 18;
314-
ScrollableList list = new CustomScrollableList(hwsCp5, name)
314+
ScrollableList list = hwsCp5.addScrollableList(name)
315315
.setOpen(false)
316316
.setColorBackground(_backgroundColor) // text field bg color
317317
.setColorValueLabel(color(0)) // text color
318318
.setColorCaptionLabel(color(0))
319319
.setColorForeground(color(125)) // border color when not selected
320320
.setColorActive(BUTTON_PRESSED) // border color when selected
321-
.setBackgroundColor(OBJECT_BORDER_GREY)
321+
.setOutlineColor(OBJECT_BORDER_GREY)
322322
.setSize(dropdownW, dropdownH)//temporary size
323323
.setBarHeight(dropdownH) //height of top/primary bar
324324
.setItemHeight(dropdownH) //height of all item/dropdown bars

OpenBCI_GUI/Board.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ abstract class Board implements DataSource {
44

55
private FixedStack<double[]> accumulatedData = new FixedStack<double[]>();
66
private double[][] dataThisFrame;
7-
private PacketLossTracker packetLossTracker;
7+
protected PacketLossTracker packetLossTracker;
88

99
// accessible by all boards, can be returned as valid empty data
1010
protected double[][] emptyData;

OpenBCI_GUI/BoardBrainFlowStreaming.pde

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ public enum BrainFlowStreaming_Boards
77
CYTON("Cyton", BoardIds.CYTON_BOARD),
88
CYTONDAISY("CytonDaisy", BoardIds.CYTON_DAISY_BOARD),
99
GANGLION("Ganglion", BoardIds.GANGLION_BOARD),
10-
GALEA("Galea", BoardIds.GALEA_BOARD),
1110
SYNTHETIC("Synthetic", BoardIds.SYNTHETIC_BOARD);
1211

1312
private String name;

OpenBCI_GUI/BoardBrainflow.pde

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ abstract class BoardBrainFlow extends Board {
1616
protected int[] otherChannelsCache = null;
1717

1818
protected boolean streaming = false;
19+
protected double time_last_datapoint = -1.0;
20+
protected boolean data_popup_displayed = false;
1921

2022
/* Abstract Functions.
2123
* Implement these in your board.
@@ -73,7 +75,7 @@ abstract class BoardBrainFlow extends Board {
7375
}
7476

7577
try {
76-
boardShim.start_stream (450000);
78+
boardShim.start_stream (450000, brainflowStreamer);
7779
streaming = true;
7880
}
7981
catch (BrainFlowError e) {
@@ -95,12 +97,17 @@ abstract class BoardBrainFlow extends Board {
9597
try {
9698
boardShim.stop_stream();
9799
streaming = false;
100+
time_last_datapoint = -1.0;
98101
}
99102
catch (BrainFlowError e) {
100103
println("ERROR: Exception when stoppping stream");
101104
e.printStackTrace();
102105
streaming = true;
103106
}
107+
108+
if (eegDataSource != DATASOURCE_PLAYBACKFILE && eegDataSource != DATASOURCE_STREAMING) {
109+
dataLogger.fileWriterBF.incrementBrainFlowStreamerFileNumber();
110+
}
104111
}
105112

106113
@Override
@@ -238,7 +245,25 @@ abstract class BoardBrainFlow extends Board {
238245
protected double[][] getNewDataInternal() {
239246
if(streaming) {
240247
try {
241-
return boardShim.get_board_data();
248+
double[][] data = boardShim.get_board_data();
249+
if ((data[0].length == 0) && (time_last_datapoint > 0)) {
250+
double cur_time = System.currentTimeMillis() / 1000L;
251+
double timeout = 5.0;
252+
if (cur_time - time_last_datapoint > timeout) {
253+
if (data_popup_displayed == false) {
254+
PopupMessage msg = new PopupMessage("Data Streaming Error",
255+
"No new data received in " + timeout + " seconds. Please check your device and restart a GUI session.");
256+
}
257+
outputError("Data Streaming Error: No new data received in " + timeout + " seconds. Please check your device and restart a GUI session.");
258+
data_popup_displayed = true;
259+
stopRunning();
260+
topNav.resetStartStopButton();
261+
}
262+
} else {
263+
time_last_datapoint = System.currentTimeMillis() / 1000L;
264+
data_popup_displayed = false;
265+
}
266+
return data;
242267
} catch (BrainFlowError e) {
243268
println("WARNING: could not get board data.");
244269
e.printStackTrace();

OpenBCI_GUI/BoardCyton.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ abstract class BoardCytonSerialBase extends BoardCyton implements SmoothingCapab
104104

105105
public BoardCytonSerialBase() {
106106
super();
107-
smoothData = false;
107+
setSmoothingActive(true);
108108
}
109109

110110
// synchronized is important to ensure that we dont free buffers during getting data

OpenBCI_GUI/BoardGanglion.pde

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ abstract class BoardGanglion extends BoardBrainFlow implements AccelerometerCapa
187187
}
188188
sendCommand("z");
189189
startStreaming();
190+
packetLossTracker = null;
190191
}
191192
else {
192193
if (!isCheckingImpedance) {
@@ -197,6 +198,7 @@ abstract class BoardGanglion extends BoardBrainFlow implements AccelerometerCapa
197198
stopStreaming();
198199
}
199200
sendCommand("Z");
201+
packetLossTracker = setupPacketLossTracker();
200202
}
201203
isCheckingImpedance = checkImpedance;
202204
}

0 commit comments

Comments
 (0)