Skip to content

Commit

Permalink
Add variable to help with sending num channels to shield
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ Keller committed Jul 13, 2017
1 parent b796481 commit 6997317
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions OpenBCI_Wifi_Master.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ OpenBCI_Wifi_Master_Class::OpenBCI_Wifi_Master_Class() {
present = false;
rx = false;
seekingWifi = false;
sentGains = false;
soughtWifiShield = false;
toggleWifiCS = false;
toggleWifiReset = false;
Expand Down Expand Up @@ -283,6 +284,9 @@ void OpenBCI_Wifi_Master_Class::sendGains(uint8_t numChannels, uint8_t *gains) {
if (!present) return;
if (!tx) return;

// Mark that we sent gains
if (!sentGains) sentGains = true;

// Clear the wifi buffer
bufferTxClear();

Expand Down
1 change: 1 addition & 0 deletions OpenBCI_Wifi_Master.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class OpenBCI_Wifi_Master_Class {
boolean present;
boolean rx;
boolean tx;
boolean sentGains;

char bufferRx[WIFI_SPI_MAX_PACKET_SIZE];
char bufferReadFrom[WIFI_SPI_MAX_PACKET_SIZE];
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.0.2

### New Features

* Added public boolean variable `sentGains` to trigger an initial send of gains from Cyton or Ganglion.

# v0.0.1

Initial Release

0 comments on commit 6997317

Please sign in to comment.