@@ -293,7 +293,7 @@ public final static String stopButton_pressToStop_txt = "Stop Data Stream";
293293public final static String stopButton_pressToStart_txt = " Start Data Stream" ;
294294
295295DirectoryManager directoryManager;
296- SessionSettings settings ;
296+ SessionSettings sessionSettings ;
297297GuiSettings guiSettings;
298298DataProcessing dataProcessing;
299299FilterSettings filterSettings;
@@ -428,7 +428,7 @@ void setup() {
428428
429429 // Copy sample data to the Users' Documents folder + create Recordings folder
430430 directoryManager. init();
431- settings = new SessionSettings ();
431+ sessionSettings = new SessionSettings ();
432432 guiSettings = new GuiSettings (directoryManager. getSettingsPath());
433433 userPlaybackHistoryFile = directoryManager. getSettingsPath()+ " UserPlaybackHistory.json" ;
434434
@@ -445,8 +445,8 @@ void delayedSetup() {
445445 smooth (); // turn this off if it's too slow
446446
447447 surface. setResizable(true ); // updated from frame.setResizable in Processing 2
448- settings . widthOfLastScreen = width ; // for screen resizing (Thank's Tao)
449- settings . heightOfLastScreen = height ;
448+ sessionSettings . widthOfLastScreen = width ; // for screen resizing (Thank's Tao)
449+ sessionSettings . heightOfLastScreen = height ;
450450
451451 setupContainers();
452452
@@ -533,8 +533,8 @@ synchronized void draw() {
533533 dataProcessing. networkingDataAccumulator. compareAndSetNetworkingFrameLocks();
534534 }
535535 } else if (systemMode == SYSTEMMODE_INTROANIMATION ) {
536- if (settings . introAnimationInit == 0 ) {
537- settings . introAnimationInit = millis ();
536+ if (sessionSettings . introAnimationInit == 0 ) {
537+ sessionSettings . introAnimationInit = millis ();
538538 } else {
539539 introAnimation();
540540 }
@@ -750,12 +750,12 @@ void initSystem() {
750750 // don't save default session settings for StreamingBoard
751751 if (eegDataSource != DATASOURCE_STREAMING ) {
752752 // Init software settings: create default settings file that is datasource unique
753- settings . init();
753+ sessionSettings . init();
754754 verbosePrint(" OpenBCI_GUI: initSystem: Session settings initialized" );
755755 }
756756
757757 if (guiSettings. getAutoLoadSessionSettings()) {
758- settings . autoLoadSessionSettings();
758+ sessionSettings . autoLoadSessionSettings();
759759 verbosePrint(" OpenBCI_GUI: initSystem: User default session settings automatically loaded" );
760760 }
761761
@@ -970,10 +970,10 @@ void systemUpdate() { // for updating data values and variables
970970 // updates while in system control panel before START SYSTEM
971971 controlPanel. update();
972972
973- if (settings . widthOfLastScreen != width || settings . heightOfLastScreen != height ) {
973+ if (sessionSettings . widthOfLastScreen != width || sessionSettings . heightOfLastScreen != height ) {
974974 topNav. screenHasBeenResized(width , height );
975- settings . widthOfLastScreen = width ;
976- settings . heightOfLastScreen = height ;
975+ sessionSettings . widthOfLastScreen = width ;
976+ sessionSettings . heightOfLastScreen = height ;
977977 // println("W = " + width + " || H = " + height);
978978 }
979979 }
@@ -982,19 +982,19 @@ void systemUpdate() { // for updating data values and variables
982982
983983 // alternative component listener function (line 177 mouseReleased- 187 frame.addComponentListener) for processing 3,
984984 // Component listener doesn't seem to work, so staying with this method for now
985- if (settings . widthOfLastScreen != width || settings . heightOfLastScreen != height ) {
986- settings . screenHasBeenResized = true ;
987- settings . timeOfLastScreenResize = millis ();
988- settings . widthOfLastScreen = width ;
989- settings . heightOfLastScreen = height ;
985+ if (sessionSettings . widthOfLastScreen != width || sessionSettings . heightOfLastScreen != height ) {
986+ sessionSettings . screenHasBeenResized = true ;
987+ sessionSettings . timeOfLastScreenResize = millis ();
988+ sessionSettings . widthOfLastScreen = width ;
989+ sessionSettings . heightOfLastScreen = height ;
990990 }
991991
992992 // re-initialize GUI if screen has been resized and it's been more than 1/2 seccond (to prevent reinitialization of GUI from happening too often)
993- if (settings . screenHasBeenResized && settings . timeOfLastScreenResize + 500 > millis ()) {
993+ if (sessionSettings . screenHasBeenResized && sessionSettings . timeOfLastScreenResize + 500 > millis ()) {
994994 ourApplet = this ; // reset PApplet...
995995 topNav. screenHasBeenResized(width , height );
996996 wm. screenResized();
997- settings . screenHasBeenResized = false ;
997+ sessionSettings . screenHasBeenResized = false ;
998998 }
999999
10001000 if (wm. isWMInitialized) {
@@ -1064,7 +1064,7 @@ void systemInitSession() {
10641064// Global function to update the number of channels
10651065void updateGlobalChannelCount (int _channelCount ) {
10661066 globalChannelCount = _channelCount;
1067- settings . sessionSettingsChannelCount = _channelCount; // used in SoftwareSettings.pde only
1067+ sessionSettings . sessionSettingsChannelCount = _channelCount; // used in SoftwareSettings.pde only
10681068 fftBuff = new ddf.minim.analysis.FFT [globalChannelCount]; // reinitialize the FFT buffer
10691069 println (" OpenBCI_GUI: Channel count set to " + str (globalChannelCount));
10701070}
@@ -1076,8 +1076,8 @@ void introAnimation() {
10761076 int t1 = 0 ;
10771077 float transparency = 0 ;
10781078
1079- if (millis () >= settings . introAnimationInit) {
1080- transparency = map (millis () - settings . introAnimationInit, t1, settings . introAnimationDuration, 0 , 255 );
1079+ if (millis () >= sessionSettings . introAnimationInit) {
1080+ transparency = map (millis () - sessionSettings . introAnimationInit, t1, sessionSettings . introAnimationDuration, 0 , 255 );
10811081 verbosePrint(String . valueOf(transparency));
10821082 tint (255 , transparency);
10831083 // draw OpenBCI Logo Front & Center
@@ -1091,7 +1091,7 @@ void introAnimation() {
10911091 }
10921092
10931093 // Exit intro animation when the duration has expired AND the Control Panel is ready
1094- if ((millis () >= settings . introAnimationInit + settings . introAnimationDuration)
1094+ if ((millis () >= sessionSettings . introAnimationInit + sessionSettings . introAnimationDuration)
10951095 && controlPanel != null ) {
10961096 systemMode = SYSTEMMODE_PREINIT ;
10971097 controlPanel. open();
0 commit comments