Skip to content

Commit 62e117f

Browse files
authored
Merge pull request #442 from retiutut/Cyton-Impedance-Fix2
Bug Fixes for 4.1.0-beta.0
2 parents 16e6e4e + 284862b commit 62e117f

6 files changed

Lines changed: 25 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# v4.1.0
22

3-
Use OpenBCIHub v2.0.5 please.
3+
Use OpenBCIHub v2.0.6 please.
4+
5+
## Beta 1
6+
7+
### Bug Fixes
8+
* Cyton impedance check did not work for Ch16 #427
49

510
## Beta 0
611

@@ -15,21 +20,21 @@ Use OpenBCIHub v2.0.5 please.
1520
* Align Ganglion accelerometer data to match Cyton #398
1621
* Fixed the GUI freezing on launch with a grey screen #409 #406 #426
1722

18-
# v4.0.4
23+
# v4.0.4
1924

20-
Use OpenBCIHub v2.0.5 please.
25+
Use OpenBCIHub v2.0.5 please.
2126

22-
### Bug Fix
27+
### Bug Fix
2328

24-
* Cyton impedance check did not work #427
29+
* Cyton impedance check did not work #427
2530

2631
# v4.0.3
2732

2833
Use OpenBCIHub v2.0.3 please.
2934

30-
### New Features
35+
### New Features
3136

32-
* On Windows, it is no longer necessary to launch the HUB separately.
37+
* On Windows, it is no longer necessary to launch the HUB separately.
3338
* The HUB is packaged within the GUI on Windows, just like on Mac and Linux.
3439

3540
### Bug Fixes

OpenBCI_GUI/BoardCyton.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ class Cyton {
687687
json.setString(TCP_JSON_KEY_TYPE, TCP_TYPE_IMPEDANCE);
688688
json.setString(TCP_JSON_KEY_ACTION, TCP_ACTION_SET);
689689
json.setInt(TCP_JSON_KEY_CHANNEL_NUMBER, _numChannel);
690-
json.setBoolean(TCP_JSON_KEY_IMPEDANCE_SET_P_INPUT, impedanceCheckValues[_numChannel][0] == '1');
691-
json.setBoolean(TCP_JSON_KEY_IMPEDANCE_SET_N_INPUT, impedanceCheckValues[_numChannel][1] == '1');
690+
json.setBoolean(TCP_JSON_KEY_IMPEDANCE_SET_P_INPUT, impedanceCheckValues[_numChannel-1][0] == '1');
691+
json.setBoolean(TCP_JSON_KEY_IMPEDANCE_SET_N_INPUT, impedanceCheckValues[_numChannel-1][1] == '1');
692692
hub.writeJSON(json);
693693
isWritingImp = false;
694694
}

OpenBCI_GUI/HardwareSettingsController.pde

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ class HardwareSettingsController{
381381
}
382382

383383
public void initImpWrite(int _numChannel, char pORn, char onORoff) {
384-
verbosePrint("Writing impedance check settings (" + pORn + "," + onORoff + ") for channel " + str(_numChannel+1) + " to OpenBCI!");
384+
verbosePrint("Writing impedance check settings (" + pORn + "," + onORoff + ") for channel " + str(_numChannel) + " to OpenBCI!");
385385
if (pORn == 'p') {
386-
impedanceCheckValues[_numChannel][0] = onORoff;
386+
impedanceCheckValues[_numChannel-1][0] = onORoff;
387387
}
388388
if (pORn == 'n') {
389-
impedanceCheckValues[_numChannel][1] = onORoff;
389+
impedanceCheckValues[_numChannel-1][1] = onORoff;
390390
}
391391
cyton.writeImpedanceSettings(_numChannel, impedanceCheckValues);
392392
// impChannelToWrite = _numChannel;
@@ -529,10 +529,10 @@ class HardwareSettingsController{
529529
}
530530
}
531531

532-
void toggleImpedanceCheck(int _channelNumber){
532+
void toggleImpedanceCheck(int _channelNumber){ //Channel Numbers start at 1
533533

534-
if(channelSettingValues[_channelNumber][4] == '1'){ //is N pin being used...
535-
if (impedanceCheckValues[_channelNumber][1] < '1') { //if not checking/drawing impedance
534+
if(channelSettingValues[_channelNumber-1][4] == '1'){ //is N pin being used...
535+
if (impedanceCheckValues[_channelNumber-1][1] < '1') { //if not checking/drawing impedance
536536
initImpWrite(_channelNumber, 'n', '1'); // turn on the impedance check for the desired channel
537537
println("Imp[" + _channelNumber + "] is on.");
538538
} else {
@@ -541,8 +541,8 @@ class HardwareSettingsController{
541541
}
542542
}
543543

544-
if(channelSettingValues[_channelNumber][4] == '0'){ //is P pin being used
545-
if (impedanceCheckValues[_channelNumber][0] < '1') { //is channel on
544+
if(channelSettingValues[_channelNumber-1][4] == '0'){ //is P pin being used
545+
if (impedanceCheckValues[_channelNumber-1][0] < '1') { //is channel on
546546
// impedanceCheckValues[i][0] = '1'; //increment [i][j] channelSettingValue by, until it reaches max values per setting [j],
547547
// channelSettingButtons[i][0].setColorNotPressed(color(25,25,25));
548548
// writeImpedanceSettings(i);

OpenBCI_GUI/Info.plist.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<key>CFBundleShortVersionString</key>
2424
<string>4</string>
2525
<key>CFBundleVersion</key>
26-
<string>4.1.0-beta.0</string>
26+
<string>4.1.0-beta.1</string>
2727
<key>CFBundleSignature</key>
2828
<string>????</string>
2929
<key>NSHumanReadableCopyright</key>

OpenBCI_GUI/OpenBCI_GUI.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import gifAnimation.*;
5050
// Global Variables & Instances
5151
//------------------------------------------------------------------------
5252
//Used to check GUI version in TopNav.pde and displayed on the splash screen on startup
53-
String localGUIVersionString = "4.1.0-beta.0";
53+
String localGUIVersionString = "4.1.0-beta.1";
5454
String localGUIVersionDate = "February 2019";
5555
String guiLatestReleaseLocation = "https://github.com/OpenBCI/OpenBCI_GUI/releases/latest";
5656
Boolean guiVersionCheckHasOccured = false;

OpenBCI_GUI/SoftwareSettings.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void initSoftwareSettings() {
235235
loadGUISettings(userSettingsFileToLoad);
236236
errorUserSettingsNotFound = false;
237237
} catch (Exception e) {
238-
e.printStackTrace();
238+
//e.printStackTrace();
239239
println(userSettingsFileToLoad + " not found. Save settings with keyboard 'n' or using dropdown menu.");
240240
errorUserSettingsNotFound = true;
241241
}

0 commit comments

Comments
 (0)