FIX: Daisy sample rate was not being set

Esse commit está contido em:
AJ Keller
2017-10-16 09:45:05 -04:00
commit 254d2d772e
3 arquivos alterados com 9 adições e 6 exclusões
+5 -2
Ver Arquivo
@@ -312,6 +312,7 @@ boolean OpenBCI_32bit_Library::processChar(char character) {
wifi.tx = commandFromSPI;
if (wifi.present && wifi.tx) {
wifi.sendStringLast("Stream started");
iSerial0.tx = false;
}
// Reads if the command is not from the SPI port and we are not in debug mode
if (!commandFromSPI && !iSerial1.tx) {
@@ -579,7 +580,7 @@ void OpenBCI_32bit_Library::boardBeginADSInterrupt(void) {
* @author: AJ Keller (@pushtheworldllc)
*/
boolean OpenBCI_32bit_Library::boardBeginDebug(void) {
boardBeginDebug(OPENBCI_BAUD_RATE);
boardBeginDebug(iSerial1.baudRate);
}
/**
@@ -590,7 +591,7 @@ boolean OpenBCI_32bit_Library::boardBeginDebug(void) {
boolean OpenBCI_32bit_Library::boardBeginDebug(int baudRate) {
beginPinsDebug();
beginSerial0();
beginSerial1();
beginSerial1(baudRate);
curBoardMode = BOARD_MODE_DEBUG;
curDebugMode = DEBUG_MODE_ON;
@@ -1698,6 +1699,8 @@ void OpenBCI_32bit_Library::initialize_ads(){
numChannels = 8; // expect up to 8 ADS channels
}else{
numChannels = 16; // expect up to 16 ADS channels
WREG(CONFIG1, (ADS1299_CONFIG1_DAISY_NOT | curSampleRate), DAISY_ADS); // tell on-board ADS to output its clk, set the data rate to 250SPS
delay(40);
}
// DEFAULT CHANNEL SETTINGS FOR ADS
+3
Ver Arquivo
@@ -3,6 +3,9 @@
### Bug Fixes
* Sending a start streaming command from `Serial0` when wifi was attached resulted in data flowing out over wifi, instead of flowing back to Serial0. If you had previous set your sample rate to 1000Hz to do WiFi, and then send a start stream command from Serial port, the board will ensure the sample rate is set to 250Hz.
* Example for BoardWithWifi.ino did not compile
* Custom sample rate for debug port was broken and not accepting sample rates.
* Daisy sample rate was not being set, so sample rate was always at 250Hz
# v3.0.0
-3
Ver Arquivo
@@ -34,9 +34,6 @@ void loop() {
// Read one char from the wifi shield
char newChar = wifi.getChar();
// Send to the sd library for processing
sdProcessChar(newChar);
// Send to the board library
board.processCharWifi(newChar);
}