diff --git a/src/board_controller/openbci/galea_serial_v4.cpp b/src/board_controller/openbci/galea_serial_v4.cpp index 133dfa440..51e32679f 100644 --- a/src/board_controller/openbci/galea_serial_v4.cpp +++ b/src/board_controller/openbci/galea_serial_v4.cpp @@ -85,7 +85,7 @@ int GaleaSerialV4::prepare_session () // set initial settings std::string tmp; - std::string default_settings = "o"; // use demo mode with agnd + std::string default_settings = "d"; // use default mode res = config_board (default_settings, tmp); if (res != (int)BrainFlowExitCodes::STATUS_OK) { @@ -127,6 +127,23 @@ int GaleaSerialV4::config_board (std::string conf, std::string &response) return res; } + if (conf == "get_gains") + { + std::stringstream gains; + + for (int i = 0; i < 20; i++) + { + gains << gain_tracker.get_gain_for_channel (i); + if (i < 19) + { + gains << ", "; + } + } + response = gains.str (); + safe_logger (spdlog::level::info, "gains for all channels: {}", response); + return (int)BrainFlowExitCodes::STATUS_OK; + } + if (gain_tracker.apply_config (conf) == (int)OpenBCICommandTypes::INVALID_COMMAND) { safe_logger (spdlog::level::warn, "invalid command: {}", conf.c_str ());