Skip to content

Commit

Permalink
Add channel labels for Cyton Digital Channels in GUI CSV and also lab…
Browse files Browse the repository at this point in the history
…el unused channels Update Cyton CSV "Other channels" in Header #1108
  • Loading branch information
retiutut committed Sep 1, 2023
1 parent 8eabc56 commit 8efcad5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Improvements
- Update repository to Processing 4.2 #1111
- Add Software Marker Widget #1091
- Add channel labels for Cyton Digital Channels in GUI CSV files and also label unused channels #1108

# v5.2.1

Expand Down
14 changes: 12 additions & 2 deletions OpenBCI_GUI/BoardCyton.pde
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,22 @@ implements ImpedanceSettingsBoard, AccelerometerCapableBoard, AnalogCapableBoard

@Override
protected void addChannelNamesInternal(String[] channelNames) {
for (int i=0; i<getAccelerometerChannels().length; i++) {
for (int i = 0; i < getAccelerometerChannels().length; i++) {
channelNames[getAccelerometerChannels()[i]] = "Accel Channel " + i;
}
for (int i=0; i<getAnalogChannels().length; i++) {
for (int i = 0; i < getAnalogChannels().length; i++) {
channelNames[getAnalogChannels()[i]] = "Analog Channel " + i;
}

channelNames[getDigitalChannels()[0]] = "Digital Channel 0 (D11)";
channelNames[getDigitalChannels()[1]] = "Digital Channel 1 (D12)";
channelNames[getDigitalChannels()[2]] = "Digital Channel 2 (D13)";
channelNames[getDigitalChannels()[3]] = "Digital Channel 3 (D17)";
channelNames[getDigitalChannels()[4]] = "Digital Channel 4 (D18)";

channelNames[getOtherChannels()[0]] = "Not Used";
channelNames[getOtherChannels()[5]] = "Not Used";

channelNames[getMarkerChannel()] = "Marker Channel";
}

Expand Down

0 comments on commit 8efcad5

Please sign in to comment.