Skip to content

Commit 93757b3

Browse files
committed
Add ability to save ChannelSelect settings to WidgetWithSettings class and apply this to TimeSeries Widget
1 parent 074fff7 commit 93757b3

6 files changed

Lines changed: 1307 additions & 881 deletions

File tree

OpenBCI_GUI/ChannelSelect.pde

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@ class ExGChannelSelect extends ChannelSelect {
232232
return activeChannels;
233233
}
234234

235+
public void updateChannelSelection(List<Integer> channels) {
236+
// First deactivate all channels
237+
deactivateAllButtons();
238+
239+
// Then activate only the selected channels
240+
for (Integer channel : channels) {
241+
if (channel >= 0 && channel < channelButtons.size()) {
242+
setToggleState(channel, true); // Changed from toggleButton
243+
}
244+
}
245+
}
235246
}
236247

237248
class DualChannelSelector {

0 commit comments

Comments
 (0)