diff --git a/OpenBCI_Wifi_Master.cpp b/OpenBCI_Wifi_Master.cpp index 0cb7304..87d0eb6 100644 --- a/OpenBCI_Wifi_Master.cpp +++ b/OpenBCI_Wifi_Master.cpp @@ -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; @@ -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(); diff --git a/OpenBCI_Wifi_Master.h b/OpenBCI_Wifi_Master.h index e3e85f1..352f937 100644 --- a/OpenBCI_Wifi_Master.h +++ b/OpenBCI_Wifi_Master.h @@ -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]; diff --git a/changelog.md b/changelog.md index ad9f143..8f7bbe9 100644 --- a/changelog.md +++ b/changelog.md @@ -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