@@ -74,7 +74,7 @@ int GaleaV4::prepare_session ()
74
74
socket->set_timeout (socket_timeout);
75
75
// force default settings for device
76
76
std::string tmp;
77
- std::string default_settings = " o " ; // use demo mode with agnd
77
+ std::string default_settings = " d " ; // use default mode
78
78
res = config_board (default_settings, tmp);
79
79
if (res != (int )BrainFlowExitCodes::STATUS_OK)
80
80
{
@@ -88,7 +88,7 @@ int GaleaV4::prepare_session ()
88
88
res = config_board (sampl_rate, tmp);
89
89
if (res != (int )BrainFlowExitCodes::STATUS_OK)
90
90
{
91
- safe_logger (spdlog::level::err, " failed to apply defaul sampling rate" );
91
+ safe_logger (spdlog::level::err, " failed to apply default sampling rate" );
92
92
delete socket;
93
93
socket = NULL ;
94
94
return (int )BrainFlowExitCodes::BOARD_NOT_READY_ERROR;
@@ -116,6 +116,23 @@ int GaleaV4::config_board (std::string conf, std::string &response)
116
116
return res;
117
117
}
118
118
119
+ if (conf == " get_gains" )
120
+ {
121
+ std::stringstream gains;
122
+
123
+ for (int i = 0 ; i < 20 ; i++)
124
+ {
125
+ gains << gain_tracker.get_gain_for_channel (i);
126
+ if (i < 19 )
127
+ {
128
+ gains << " , " ;
129
+ }
130
+ }
131
+ response = gains.str ();
132
+ safe_logger (spdlog::level::info, " gains for all channels: {}" , response);
133
+ return (int )BrainFlowExitCodes::STATUS_OK;
134
+ }
135
+
119
136
if (gain_tracker.apply_config (conf) == (int )OpenBCICommandTypes::INVALID_COMMAND)
120
137
{
121
138
safe_logger (spdlog::level::warn, " invalid command: {}" , conf.c_str ());
0 commit comments