Skip to content

Commit 4f53fdb

Browse files
author
AJ Keller
authored
Merge pull request #11 from aj-ptw/spi-wifi-fix
FIX: adding delay between spi multi chars helps with stability
2 parents ad6c5b3 + fd76ff4 commit 4f53fdb

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

OpenBCI_Ganglion_Library.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void OpenBCI_Ganglion::makeUniqueId() {
6767
SimbleeBLE.manufacturerName = "openbci.com";
6868
SimbleeBLE.modelNumber = "Ganglion";
6969
SimbleeBLE.hardwareRevision = "1.0.1";
70-
SimbleeBLE.softwareRevision = "2.0.0";
70+
SimbleeBLE.softwareRevision = "2.0.1";
7171
}
7272

7373
void OpenBCI_Ganglion::blinkLED() {
@@ -1016,6 +1016,7 @@ void OpenBCI_Ganglion::loadNewLine() {
10161016
if (commandFromSPI) {
10171017
if (wifi.present && wifi.tx) {
10181018
wifi.sendStringMulti("\n");
1019+
delay(1);
10191020
}
10201021
} else {
10211022
serialBuffer[bufferLevel][serialIndex[bufferLevel]] = '\n';
@@ -1030,6 +1031,7 @@ void OpenBCI_Ganglion::loadString(const char* thatString, int numChars, boolean
10301031
if (commandFromSPI) {
10311032
if (wifi.present && wifi.tx) {
10321033
wifi.sendStringMulti(thatString);
1034+
delay(1);
10331035
}
10341036
} else {
10351037
for (int i = 0; i < numChars; i++) {
@@ -1082,6 +1084,7 @@ void OpenBCI_Ganglion::loadChar(char thatChar, boolean addNewLine) {
10821084
if (commandFromSPI) {
10831085
if (wifi.present && wifi.tx) {
10841086
wifi.sendStringMulti(&thatChar);
1087+
delay(1);
10851088
}
10861089
} else {
10871090
serialBuffer[bufferLevel][serialIndex[bufferLevel]] = thatChar;
@@ -1131,6 +1134,7 @@ void OpenBCI_Ganglion::loadInt(int i, boolean addNewLine) {
11311134
if (commandFromSPI) {
11321135
if (wifi.present && wifi.tx) {
11331136
wifi.sendStringMulti(digit[i]);
1137+
delay(1);
11341138
}
11351139
} else {
11361140
serialBuffer[bufferLevel][serialIndex[bufferLevel]] = digit[i];

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v2.0.1
2+
3+
### Bug Fixes
4+
5+
* Adding a delay after sending multipacket spi messages improves reliability! Some messages like sample rate got chopped up :rocket:
6+
17
# v2.0.0
28

39
### New Features

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=OpenBCI_Ganglion_Library
2-
version=2.0.0
2+
version=2.0.1
33
author=Joel Murphy <joel@openbci.com>, Conor Russomanno <conor@openbci.com>, Leif Percifield <lpercifield@gmail.com>, AJ Keller <pushtheworldllc@gmail.com>
44
maintainer=Joel Murphy <joel@openbci.com>, AJ Keller <pushtheworldllc@gmail.com>
55
sentence=The library for OpenBCI Ganglion board. Please use the DefaultGanglion.ino file in the examples to use the code that ships with every Ganglion board. Look through the skimmed down versions of the main firmware in the other examples.

0 commit comments

Comments
 (0)