Skip to content

Commit

Permalink
Merge remote-tracking branch 'openbci/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey1994 committed Mar 12, 2020
2 parents 03e720b + 80ea96f commit fa668ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/board_controller/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "multicast_streamer.h"
#include "stub_streamer.h"

#include "spdlog/sinks/null_sink.h"


#define LOGGER_NAME "brainflow_logger"

Expand All @@ -30,10 +32,13 @@ int Board::set_log_level (int level)
int Board::set_log_file (char *log_file)
{
spdlog::level::level_enum level = Board::board_logger->level ();
Board::board_logger = spdlog::create<spdlog::sinks::null_sink_st> (
"null_logger"); // to dont set logger to nullptr and avoid raice condition
spdlog::drop (LOGGER_NAME);
Board::board_logger = spdlog::basic_logger_mt (LOGGER_NAME, log_file);
Board::board_logger->set_level (level);
Board::board_logger->flush_on (level);
spdlog::drop ("null_logger");
return STATUS_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/python/hardware_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def main ():

columns = list ()
for i in range (len (total_channels) - 1):
columns.append ('channel_%d' % i)
columns.append ('channel_%d' % (int(total_channels[i]) - 1))
columns.append ('timestamp')

df = pd.DataFrame (np.transpose (data))
Expand Down

0 comments on commit fa668ff

Please sign in to comment.