@@ -42,14 +42,14 @@ class EmgSettingsUI extends PApplet implements Runnable {
4242 public EmgSettingsValues emgSettingsValues;
4343
4444 private TextBox channelColumnLabel;
45- private TextBox smoothLabel ;
45+ private TextBox windowLabel ;
4646 private TextBox uvLimitLabel;
4747 private TextBox creepIncLabel;
4848 private TextBox creepDecLabel;
4949 private TextBox minDeltaUvLabel;
5050 private TextBox lowLimitLabel;
5151
52- private ScrollableList [] smoothLists ;
52+ private ScrollableList [] windowLists ;
5353 private ScrollableList [] uvLimitLists;
5454 private ScrollableList [] creepIncLists;
5555 private ScrollableList [] creepDecLists;
@@ -129,7 +129,7 @@ class EmgSettingsUI extends PApplet implements Runnable {
129129
130130 // Draw column labels
131131 channelColumnLabel. draw();
132- smoothLabel . draw();
132+ windowLabel . draw();
133133 uvLimitLabel. draw();
134134 creepIncLabel. draw();
135135 creepDecLabel. draw();
@@ -154,7 +154,7 @@ class EmgSettingsUI extends PApplet implements Runnable {
154154 int colOffset = colWidth / 2 ;
155155 int labelY = y + HEADER_HEIGHT / 2 ;
156156 channelColumnLabel. setPosition(x + colOffset, labelY);
157- smoothLabel . setPosition(x + colOffset + colWidth, labelY);
157+ windowLabel . setPosition(x + colOffset + colWidth, labelY);
158158 uvLimitLabel. setPosition(x + colOffset + colWidth* 2 , labelY);
159159 creepIncLabel. setPosition(x + colOffset + colWidth* 3 , labelY);
160160 creepDecLabel. setPosition(x + colOffset + colWidth* 4 , labelY);
@@ -244,8 +244,8 @@ class EmgSettingsUI extends PApplet implements Runnable {
244244 dropdownYPositions[i] = HEADER_HEIGHT + int (y + ((ROW_HEIGHT ) * i) + (((ROW_HEIGHT ) - DROPDOWN_HEIGHT ) / 2 ));
245245 final int buttonXIncrement = DROPDOWN_SPACER + dropdownWidth;
246246
247- smoothLists [i]. setPosition(dropdownX, dropdownYPositions[i]);
248- smoothLists [i]. setSize(dropdownWidth, MAX_HEIGHT_ITEMS * DROPDOWN_HEIGHT );
247+ windowLists [i]. setPosition(dropdownX, dropdownYPositions[i]);
248+ windowLists [i]. setSize(dropdownWidth, MAX_HEIGHT_ITEMS * DROPDOWN_HEIGHT );
249249
250250 dropdownX += buttonXIncrement;
251251 uvLimitLists[i]. setPosition(dropdownX, dropdownYPositions[i]);
@@ -292,7 +292,7 @@ class EmgSettingsUI extends PApplet implements Runnable {
292292 int colOffset = colWidth / 2 ;
293293 int labelY = y + HEADER_HEIGHT / 2 ;
294294 channelColumnLabel = new TextBox (" Channel" , x + colOffset, labelY, labelTxt, labelBG, 12 , h3, CENTER , TOP );
295- smoothLabel = new TextBox (" Smooth " , x + colOffset + colWidth, labelY, labelTxt, labelBG, 12 , h3, CENTER , TOP );
295+ windowLabel = new TextBox (" Window " , x + colOffset + colWidth, labelY, labelTxt, labelBG, 12 , h3, CENTER , TOP );
296296 uvLimitLabel = new TextBox (" uV Limit" , x + colOffset + colWidth* 2 , labelY, labelTxt, labelBG, 12 , h3, CENTER , TOP );
297297 creepIncLabel = new TextBox (" Creep +" , x + colOffset + colWidth* 3 , labelY, labelTxt, labelBG, 12 , h3, CENTER , TOP );
298298 creepDecLabel = new TextBox (" Creep -" , x + colOffset + colWidth* 4 , labelY, labelTxt, labelBG, 12 , h3, CENTER , TOP );
@@ -306,7 +306,7 @@ class EmgSettingsUI extends PApplet implements Runnable {
306306 // the size and space of these buttons are dependendant on the size of the screen and full ChannelController
307307 verbosePrint(" EmgChannelSettingsUI: Creating EMG channel setting UI objects..." );
308308
309- smoothLists = new ScrollableList [channelCount];
309+ windowLists = new ScrollableList [channelCount];
310310 uvLimitLists = new ScrollableList [channelCount];
311311 creepIncLists = new ScrollableList [channelCount];
312312 creepDecLists = new ScrollableList [channelCount];
@@ -318,7 +318,7 @@ class EmgSettingsUI extends PApplet implements Runnable {
318318 // Init dropdowns in reverse so that chan 1 draws on top of chan 2, etc.
319319 for (int i = channelCount - 1 ; i >= 0 ; i-- ) {
320320 int exgChannel = i;
321- smoothLists [i] = createDropdown(exgChannel, " smooth_ch_" + (i+ 1 ), emgSettingsValues. smoothing [exgChannel]. values(), emgSettingsValues. smoothing [exgChannel]);
321+ windowLists [i] = createDropdown(exgChannel, " smooth_ch_" + (i+ 1 ), emgSettingsValues. window [exgChannel]. values(), emgSettingsValues. window [exgChannel]);
322322 uvLimitLists[i] = createDropdown(exgChannel, " uvLimit_ch_" + (i+ 1 ), emgSettingsValues. uvLimit[exgChannel]. values(), emgSettingsValues. uvLimit[exgChannel]);
323323 creepIncLists[i] = createDropdown(exgChannel, " creep_inc_ch_" + (i+ 1 ), emgSettingsValues. creepIncreasing[exgChannel]. values(), emgSettingsValues. creepIncreasing[exgChannel]);
324324 creepDecLists[i] = createDropdown(exgChannel, " creep_dec_ch_" + (i+ 1 ), emgSettingsValues. creepDecreasing[exgChannel]. values(), emgSettingsValues. creepDecreasing[exgChannel]);
@@ -386,9 +386,8 @@ class EmgSettingsUI extends PApplet implements Runnable {
386386 EmgSettingsEnum myEnum = (EmgSettingsEnum )bob. get(" value" );
387387 verbosePrint(" EmgSettings: " + (theEvent. getController()). getName() + " == " + myEnum. getString());
388388
389- if (myEnum instanceof EmgSmoothing ) {
390- // verbosePrint("HardwareSettings: previousVal == " + emgSettingsValues.previousValues.gain[channel]);
391- emgSettingsValues. smoothing[channel] = (EmgSmoothing )myEnum;
389+ if (myEnum instanceof EmgWindow ) {
390+ emgSettingsValues. window[channel] = (EmgWindow )myEnum;
392391 } else if (myEnum instanceof EmgUVLimit ) {
393392 emgSettingsValues. uvLimit[channel] = (EmgUVLimit )myEnum;
394393 } else if (myEnum instanceof EmgCreepIncreasing ) {
@@ -437,15 +436,15 @@ class EmgSettingsUI extends PApplet implements Runnable {
437436 private void updateCp5Objects () {
438437 for (int i = 0 ; i < channelCount; i++ ) {
439438 // Fetch values from the EmgSettingsValues object
440- EmgSmoothing updateSmoothing = emgSettingsValues. smoothing [i];
439+ EmgWindow updateSmoothing = emgSettingsValues. window [i];
441440 EmgUVLimit updateUVLimit = emgSettingsValues. uvLimit[i];
442441 EmgCreepIncreasing updateCreepIncreasing = emgSettingsValues. creepIncreasing[i];
443442 EmgCreepDecreasing updateCreepDecreasing = emgSettingsValues. creepDecreasing[i];
444443 EmgMinimumDeltaUV updateMinimumDeltaUV = emgSettingsValues. minimumDeltaUV[i];
445444 EmgLowerThresholdMinimum updateLowerThresholdMinimum = emgSettingsValues. lowerThresholdMinimum[i];
446445
447446 // Update the ScrollableLists
448- smoothLists [i]. getCaptionLabel(). setText(updateSmoothing. getString());
447+ windowLists [i]. getCaptionLabel(). setText(updateSmoothing. getString());
449448 uvLimitLists[i]. getCaptionLabel(). setText(updateUVLimit. getString());
450449 creepIncLists[i]. getCaptionLabel(). setText(updateCreepIncreasing. getString());
451450 creepDecLists[i]. getCaptionLabel(). setText(updateCreepDecreasing. getString());
0 commit comments