Skip to content

Commit

Permalink
updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Dieudonné committed Dec 23, 2024
1 parent d0c92f2 commit 37b84ba
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/board_controller/ant_neuro/ant_neuro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ int AntNeuroBoard::start_stream (int buffer_size, const char *streamer_params)

try
{
if (impedance_mode) {
safe_logger (spdlog::level::info,
"start impedance stream");
stream = amp->OpenImpedanceStream();
if (impedance_mode)
{
safe_logger (spdlog::level::info, "start impedance stream");
stream = amp->OpenImpedanceStream ();
}
else
{
Expand Down Expand Up @@ -281,9 +281,10 @@ void AntNeuroBoard::read_thread ()
push_package (package);
}
std::this_thread::sleep_for (std::chrono::milliseconds (1));
if (impedance_mode) {
// some more sleep; twice every second should be more than enough
// if left out, it yields impedances at around 64 Hz
if (impedance_mode)
{
// some more sleep; twice every second should be more than enough
// if left out, it yields impedances at around 64 Hz
std::this_thread::sleep_for (std::chrono::milliseconds (500));
}
}
Expand Down Expand Up @@ -406,16 +407,16 @@ int AntNeuroBoard::config_board (std::string config, std::string &response)

return (int)BrainFlowExitCodes::STATUS_OK;
}
else if (config.find(mode_prefix) != std::string::npos)
else if (config.find (mode_prefix) != std::string::npos)
{
bool new_impedance_mode;
std::string value = config.substr(mode_prefix.size());
std::string value = config.substr (mode_prefix.size ());

if (value == "0" || value == "1")
{
try
{
new_impedance_mode = static_cast<bool>(std::stod(value));
new_impedance_mode = static_cast<bool> (std::stod (value));
}
catch (...)
{
Expand Down

0 comments on commit 37b84ba

Please sign in to comment.