-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for multiple internal buffers (#510)
* add multiple buffers Signed-off-by: Andrey Parfenov <[email protected]>
- Loading branch information
1 parent
06a015e
commit 9f069c7
Showing
161 changed files
with
5,541 additions
and
2,602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include <iostream> | ||
#include <stdlib.h> | ||
#include <string> | ||
|
||
#ifdef _WIN32 | ||
#include <windows.h> | ||
#else | ||
#include <unistd.h> | ||
#endif | ||
|
||
#include "board_shim.h" | ||
#include "data_filter.h" | ||
#include "ml_model.h" | ||
|
||
using namespace std; | ||
|
||
|
||
int main (int argc, char *argv[]) | ||
{ | ||
BoardShim::enable_dev_board_logger (); | ||
|
||
struct BrainFlowInputParams params; | ||
int board_id = (int)BoardIds::MUSE_S_BOARD; | ||
int res = 0; | ||
|
||
BoardShim *board = new BoardShim (board_id, params); | ||
|
||
try | ||
{ | ||
board->prepare_session (); | ||
board->config_board ("p61"); | ||
board->add_streamer ("file://streamer_default.csv:w"); | ||
board->add_streamer ("file://streamer_aux.csv:w", (int)BrainFlowPresets::AUXILIARY_PRESET); | ||
board->add_streamer ("file://streamer_anc.csv:w", (int)BrainFlowPresets::ANCILLARY_PRESET); | ||
board->start_stream (); | ||
|
||
#ifdef _WIN32 | ||
Sleep (10000); | ||
#else | ||
sleep (10); | ||
#endif | ||
board->stop_stream (); | ||
board->release_session (); | ||
} | ||
catch (const BrainFlowException &err) | ||
{ | ||
BoardShim::log_message ((int)LogLevels::LEVEL_ERROR, err.what ()); | ||
res = err.exit_code; | ||
if (board->is_prepared ()) | ||
{ | ||
board->release_session (); | ||
} | ||
} | ||
|
||
delete board; | ||
|
||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.