Skip to content

Commit dc5ea59

Browse files
authored
Merge pull request #1182 from OpenBCI/label-cyton-csv-digital-channels
Add channel labels for Cyton Digital Channels in GUI CSV
2 parents 8eabc56 + 8efcad5 commit dc5ea59

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Improvements
44
- Update repository to Processing 4.2 #1111
55
- Add Software Marker Widget #1091
6+
- Add channel labels for Cyton Digital Channels in GUI CSV files and also label unused channels #1108
67

78
# v5.2.1
89

OpenBCI_GUI/BoardCyton.pde

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,12 +602,22 @@ implements ImpedanceSettingsBoard, AccelerometerCapableBoard, AnalogCapableBoard
602602

603603
@Override
604604
protected void addChannelNamesInternal(String[] channelNames) {
605-
for (int i=0; i<getAccelerometerChannels().length; i++) {
605+
for (int i = 0; i < getAccelerometerChannels().length; i++) {
606606
channelNames[getAccelerometerChannels()[i]] = "Accel Channel " + i;
607607
}
608-
for (int i=0; i<getAnalogChannels().length; i++) {
608+
for (int i = 0; i < getAnalogChannels().length; i++) {
609609
channelNames[getAnalogChannels()[i]] = "Analog Channel " + i;
610610
}
611+
612+
channelNames[getDigitalChannels()[0]] = "Digital Channel 0 (D11)";
613+
channelNames[getDigitalChannels()[1]] = "Digital Channel 1 (D12)";
614+
channelNames[getDigitalChannels()[2]] = "Digital Channel 2 (D13)";
615+
channelNames[getDigitalChannels()[3]] = "Digital Channel 3 (D17)";
616+
channelNames[getDigitalChannels()[4]] = "Digital Channel 4 (D18)";
617+
618+
channelNames[getOtherChannels()[0]] = "Not Used";
619+
channelNames[getOtherChannels()[5]] = "Not Used";
620+
611621
channelNames[getMarkerChannel()] = "Marker Channel";
612622
}
613623

0 commit comments

Comments
 (0)