Skip to content

Commit

Permalink
fixing board_descr
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
  • Loading branch information
Andrey1994 committed Jun 30, 2024
1 parent 5386512 commit 1b69409
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion src/board_controller/brainflow_boards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ BrainFlowBoards::BrainFlowBoards()
{"50", json::object()},
{"51", json::object()},
{"52", json::object()},
{"53", json::object()}
{"53", json::object()},
{"54", json::object()},
{"55", json::object()},
{"56", json::object()}
}
}};

Expand Down Expand Up @@ -1082,6 +1085,16 @@ BrainFlowBoards::BrainFlowBoards()
{"battery_channel", 2},
{"other_channels", {3}}
};
brainflow_boards_json["boards"]["56"]["default"] = {
{"name", "PIEEG"},
{"sampling_rate", 250},
{"package_num_channel", 0},
{"timestamp_channel", 9},
{"marker_channel", 10},
{"num_rows", 11},
{"eeg_channels", {1, 2, 3, 4, 5, 6, 7, 8}},
{"eeg_names", "Fp1,Fp2,C3,C4,P7,P8,O1,O2"}
};
}

BrainFlowBoards boards_struct;
4 changes: 2 additions & 2 deletions src/board_controller/pieeg/pieeg_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void PIEEGBoard::read_thread ()

double eeg_scale = 4.5 / float ((pow (2, 23) - 1)) / 8 * 1000000.;
double timestamp = 0;
int counter = 0;
unsigned int counter = 0;
int timeout_ms = 1000;
uint32_t data_test = 0x7FFFFF;
uint32_t data_check = 0xFFFFFF;
Expand Down Expand Up @@ -269,7 +269,7 @@ void PIEEGBoard::read_thread ()
package[eeg_channels[i]] = 0.27 * voltage;
}
package[board_descr["default"]["timestamp_channel"].get<int> ()] = timestamp;
package[board_descr["default"]["package_num_channel"].get<int> ()] = counter++;
package[board_descr["default"]["package_num_channel"].get<int> ()] = (double)counter++;
push_package (package);
}
}
Expand Down

0 comments on commit 1b69409

Please sign in to comment.