MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / config_board

Method config_board

src/board_controller/openbci/openbci_serial_board.cpp:47–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47int OpenBCISerialBoard::config_board (std::string config, std::string &response)
48{
49 if (!initialized)
50 {
51 return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR;
52 }
53 int res = (int)BrainFlowExitCodes::STATUS_OK;
54 if (is_streaming)
55 {
56 safe_logger (spdlog::level::warn,
57 "You are changing board params during streaming, it may lead to sync mismatch between "
58 "data acquisition thread and device");
59 res = send_to_board (config.c_str ());
60 }
61 else
62 {
63 // read response if streaming is not running
64 res = send_to_board (config.c_str (), response);
65 }
66
67 if (res == (int)BrainFlowExitCodes::STATUS_OK)
68 {
69 track_openbci_sampling_rate (board_id, config, current_sampling_rate);
70 }
71 return res;
72}
73
74int OpenBCISerialBoard::send_to_board (const char *msg)
75{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected