Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/board_controller/brainflow_boards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ BrainFlowBoards::BrainFlowBoards()
{"marker_channel", 28},
{"num_rows", 29},
{"eeg_channels", {9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}},
{"eeg_names", "F1,C3,F2,Cz,C4,Pz,P4,O2,P3,O1,X1,X2,X3,X4,X5,X6"},
{"eeg_names", "F1,F2,C3,C4,P3,P4,O1,O2,Cz,Pz,X1,X2,X3,X4,X5,X6"},
{"emg_channels", {1, 2, 3, 4, 7, 8}},
{"eog_channels", {5, 6}},
{"other_channels", {25, 26}},
Expand Down
23 changes: 10 additions & 13 deletions src/board_controller/openbci/inc/openbci_gain_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class GaleaGainTracker : public OpenBCIGainTracker
public:
GaleaGainTracker ()
: OpenBCIGainTracker ({4, 4, 4, 4, 4, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 4,
4, 4, 12, 12}) // 8 EMG + 12 EEG + 4 AUX(EMG) + 2 Reserved
4, 4, 12, 12}) // Channels 1-8: EMG, 9-18: EEG, 19-22: AUX(EMG), 23-24: Reserved
{
channel_letters = std::vector<char> {'1', '2', '3', '4', '5', '6', '7', '8', 'Q', 'W', 'E',
'R', 'T', 'Y', 'U', 'I', 'A', 'S', 'D', 'G', 'H', 'J', 'K', 'L'};
Expand All @@ -213,27 +213,24 @@ class GaleaGainTracker : public OpenBCIGainTracker
if ((config.at (0) == 'o') || (config.at (0) == 'd'))
{
std::copy (current_gains.begin (), current_gains.end (), old_gains.begin ());
// 8 EMG + 12 EEG + 4 AUX(EMG) + 2 Reserved
// Channels 1-8: EMG, 9-18: EEG, 19-22: AUX(EMG), 23-24: Reserved
for (size_t i = 0; i < current_gains.size (); i++)
{
if (i < 8) // EMG channels 0-7
if (i < 8) // Channels 1-8: EMG (indices 0-7)
{
current_gains[i] = 4;
}
else if (i < 20) // EEG channels 8-19
else if (i < 18) // Channels 9-18: EEG (indices 8-17)
{
current_gains[i] = 12;
}
else if (i < 24) // AUX channels 20-23 (4 AUX EMG + 2 Reserved)
else if (i < 22) // Channels 19-22: AUX EMG (indices 18-21)
{
if (i < 22) // AUX EMG channels 20-21
{
current_gains[i] = 4;
}
else // Reserved channels 22-23
{
current_gains[i] = 12;
}
current_gains[i] = 4;
}
else if (i < 24) // Channels 23-24: Reserved (indices 22-23)
{
current_gains[i] = 12;
}
}
}
Expand Down
Loading