From 9e465cddc2438be7d2e4dbf0fc8e8b02e2f80bfa Mon Sep 17 00:00:00 2001 From: jdpigeon Date: Fri, 4 Aug 2017 13:19:32 -0400 Subject: [PATCH] Version 2.0 (code 15) with refactored connection and BCI modules --- EEG101/android/app/build.gradle | 2 +- .../components/graphs/EEGGraph.java | 2 - EEG101/src/assets/light.png | Bin 4832 -> 5039 bytes EEG101/src/assets/vibrate.png | Bin 5580 -> 5499 bytes EEG101/src/components/DataCollector.js | 4 +- EEG101/src/components/MiniChart.js | 13 +- EEG101/src/components/PlayPauseButton.js | 2 +- EEG101/src/i18n/locales/en.js | 1 + EEG101/src/redux/reducer.js | 5 +- EEG101/src/scenes/bci-01.js | 12 + EEG101/src/scenes/bci-02.js | 11 + EEG101/src/scenes/bci-run.js | 12 +- EEG101/src/scenes/bci-train.js | 15 +- EEG101/src/scenes/slide-01-offline.js | 268 ------------------ EEG101/src/scenes/slide-01.js | 26 +- EEG101/src/scenes/slide-03.js | 2 +- EEG101/src/scenes/slide-04.js | 2 +- EEG101/src/scenes/slide-05.js | 2 +- EEG101/src/scenes/slide-06.js | 2 +- EEG101/src/scenes/slide-08.js | 2 +- EEG101/src/scenes/slide-09.js | 2 +- 21 files changed, 96 insertions(+), 289 deletions(-) delete mode 100644 EEG101/src/scenes/slide-01-offline.js diff --git a/EEG101/android/app/build.gradle b/EEG101/android/app/build.gradle index f4662e81..42e83b7b 100644 --- a/EEG101/android/app/build.gradle +++ b/EEG101/android/app/build.gradle @@ -90,7 +90,7 @@ android { applicationId "com.eeg_project" minSdkVersion 16 targetSdkVersion 25 - versionCode 14 + versionCode 15 versionName "2.0" ndk { abiFilters "armeabi-v7a" diff --git a/EEG101/android/app/src/main/java/com/eeg_project/components/graphs/EEGGraph.java b/EEG101/android/app/src/main/java/com/eeg_project/components/graphs/EEGGraph.java index 9379aea9..442a42fe 100644 --- a/EEG101/android/app/src/main/java/com/eeg_project/components/graphs/EEGGraph.java +++ b/EEG101/android/app/src/main/java/com/eeg_project/components/graphs/EEGGraph.java @@ -139,8 +139,6 @@ public void initView(Context context) { // Create eegPlot eegPlot = new XYPlot(context, "Raw EEG Plot"); - // get datasets (Y will be dataSeries, x will be implicitly generated): - //dataSource = new EEGDataSource(appState.connectedMuse.isLowEnergy()); dataSeries = new DynamicSeries("dataSeries"); diff --git a/EEG101/src/assets/light.png b/EEG101/src/assets/light.png index 3cea70fa3119cb0351268c1bac55baa8b805c6f2..2947771823a6062b4869d575275743c1e95de5eb 100644 GIT binary patch literal 5039 zcmbtY`9G9j*nS3$A;x5Dk{DYkdqc`LWGlPMp0ULsOCq}&`;xsZLn5?_3E3iK&5|V9 zcgmK=SjRf=)Axt>4|w16`JD5dAI@_x*E#of-{-^|8|tt!^DqMdzhu1aLZv{ME%L}~6I~>~CWazh^DVD%_{pQ?_LJ5q0(1q%}Pn56TtAB+wk zk+M>Z4j(h@SFHBm@63IbcdjqJexc9DpLztSjZ~aqmESyS+|9k*v>OZvL?JX_|DQqp z0biFatenMkkl$opv>LW|fPQtga3@C34{TRUek?7(e3S8 zcS~x6cgy6|)MzRI7vd6~0j4`yCzTt2g0Rw)C5;#7ek7i&h32_k`296|N@o*e0o0Y_ zi*H~Imfmk)9enw>0g`CSo-LS@Aan~R{_aw^AxpSt;6rQTk-7< zBzhcR%viv_Y)OEkL{iYrkht$O1fj!1Vy82ZX9h_KDt3XqR4a&L}8+JZ*Nb5lg5{>+^_l}6xcB`G~^4~ zUw(zBe2!%F5_#OEtE1DY&PnPE>$zR<5-MJI$7#MhkPC(F=;SztrtUp0lc;hDy z{kFHS?>D;_pa`KH+wH{4905K6rk%q``Tl)Z*JZ3jxy8y@l{>k#wDgE?U^n&dmVTLj3&+c>V^iJ0M9Hjo^G; zxc?!W-nGC+o~YZTrU~h6RqaFv5v(H3Fo`qU2D-)IZ+MQ}Qn>T0h@kR-$HO z6@~C)ZCkQsw1=JXTcMRiT+ypO>-?>*?g|aGwdpH({zZk0krkk_#c`W6kkdV+cd2KDPwZlM3KT=;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%OWL%R1Wv9 zQxwtVS#;)1zT`69Vutr=jN#DVkA2KU+(E36Wc^){dr3RWuhw0PR$Kx_70JJgAMnf5 z6^SsMt1}Vz(@eaMCqLN3ySI=&BS&#^q)as()Nez%_~ma2*vJeGBMkZN64X7_c~nM& zo@_Q+QhfL}2S2S_8~zZ}PJx>BbIE^!8aW$1sHuvvCTFAWtduk=Knvv@p#%%F&|zt{Vq)VTFiL40xp diff --git a/EEG101/src/assets/vibrate.png b/EEG101/src/assets/vibrate.png index 9bee9f591b06fd6107f761455eee2c93f1205d1b..334c4652f78bfa179f7481fe76ef781b339cbd18 100644 GIT binary patch literal 5499 zcmcIo`6EZg zElqrVEq;oSHv9Tka;p*BNUTE?=LPe;HO@~J2gzyo-`2hMAE(qV8iE?`TJfBb-XvXg zn9BTGc0-fm>lpwd06ZI^np42EWyvM!(g)UN}mdUijhvL(`RdaQBmPz<)DjH*LNO ziCyIjcOp_AZj(zMpq@r%?@IRxCRebuh8yw?SiM zRaG_1$jH2H45Vs=?5vKt<8Zi~kzVVYH-DR+my^?MY-&1O`SIh2w)Ar{4-;*-6Vizz zGU%-Oo*+;j;p{v$^X1DIMHBVyeqU(f&$l`ia@HVsX6@99MVGeo9`8rkdXM% z<$BjX;mH#pgM@^HnFOpzisICI{qk9EZhaFIlZfWZ$_>Ft%mfWKQ2&U>6wcyobR4z4 zy?vEB*0{5{z5L6YEkZ4ITptX5>X78BkbcYF{-`)NHy7EewKukBIH9!~HB3+rw<{?~wjmiiGjdVxjoU1@14v@-ite3wJ9 zeGdMjn%cnu+d1PKFcq;8&|aA3mF5u(T#~Z7>ccH4IKDnJej3KqcCBN2y?UH_!U>uW z(;jlHp$xzylu4`0Bw=W1X=eO_Nkp6cGn!Q3$%jJ@Q!3mwDVMBC2k^m6xnr?!0lQ@@f zO>9bf6p2DU%7&YYkAP!BNhGr70q_ivJVj7A%hXFgAk0!ppyqCq(K>AAGSp?-RkzLmoDoPOw@~**8{zNl^!vGKY=ePdjc5PU-?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rBzQw>ad+1!clvd9%%1p(;2RgwAEJ(FVLtbJ^>ChN#aj#;zc=zb(tP2t{ zHG=S^o%r`_(Hu%_Uaiaeli@zkgak#q3u|>BF9TkD#JD?W592FlbyF#AbgI+gY|AaL zY3}^ZVx5p)H%@V8RIbjWTw z&?x9k_~kd;kRP2q@QZo(T8ul$liYRW9~ju#*4X%Gv#+lY+u^d(3*DqHLamnA@bIk_ z3;D3HFw?1x!oortnM|H&k2~0f^d>ei(BHpJr4>KAW>E6AD?v(H;oh&xZdlj z*rSquvsF9vp>cU}iK7B%!URi(PSJ-8fcleudS@5AB4!{Gi%zu4O`!65X2Wuf)@<<9 zcXj}DFW745InvJ3xfu$oWV}t>iHTd0O4h9*AKsA0$?z=* zAnrzAwYX6MbwynC>};xilMSvZ3*V26$(-1Ii^fqdHWfjaal4TXcJ=Z+nDfo{3gnBK zz7Ve`+jB$o!4smKI1T}KV`d@cU8(1M2Jlc}jJ((b(uLANt`9qPfm!>-mh)aeLwB{9 z$TAjpvcIC4$c5D+NE^{+h@qrw&qloF4u*B_(2o@O5C>jr!sj4G+nKQ*!gePmsDE^<8(jJ>j|MprQ!!N!vGr3RR~ zu(t1-*!Xvw{JVW!vWxVV4v8m^3|9KIe`*Rmsyb&>iOOg4q1|X24;Q#bPLNi7tmHUP zgDTegZrGa7&(bIRr7oY&pF&32T&hEVt`u}Q-7>TFG;J2nb*qqL1WSdsDThg_??3Qb zvp8Mhn>utYm`yV8)Xl123U_=XlfeMr)Q#gcsz_?~XGxsi`OfzWOaco*UY=9QAw#(# zi9SuI&isS^L4KUmBb0nH?pJE5JHPV>6Y~Vx%c)?N`f2I^!wx20VFwrPkXo^BnW+nP PX#t}P<_7ipZnysfFA+gB diff --git a/EEG101/src/components/DataCollector.js b/EEG101/src/components/DataCollector.js index f8919348..91d5d6ca 100644 --- a/EEG101/src/components/DataCollector.js +++ b/EEG101/src/components/DataCollector.js @@ -99,7 +99,7 @@ export default class DataCollector extends Component { {I18n.t("totalCleanData")} ); @@ -127,7 +127,7 @@ export default class DataCollector extends Component { {I18n.t("totalCleanData2")} ); diff --git a/EEG101/src/components/MiniChart.js b/EEG101/src/components/MiniChart.js index 28ebbce9..9e91b3c6 100644 --- a/EEG101/src/components/MiniChart.js +++ b/EEG101/src/components/MiniChart.js @@ -41,6 +41,7 @@ export default class MiniChart extends Component { style={{ position: "absolute", left: -20, + bottom: 75, fontWeight: "100", color: colors.black, fontFamily: "Roboto-Light", @@ -48,12 +49,12 @@ export default class MiniChart extends Component { transform: [{ rotate: "270deg" }] }} > - {" "}Feature Rank + {" "}Feature Power @@ -67,6 +68,7 @@ export default class MiniChart extends Component { /> + + + ); } diff --git a/EEG101/src/components/PlayPauseButton.js b/EEG101/src/components/PlayPauseButton.js index cf93473f..f8f5f3ff 100644 --- a/EEG101/src/components/PlayPauseButton.js +++ b/EEG101/src/components/PlayPauseButton.js @@ -19,7 +19,7 @@ export default class PlayPauseButton extends Component{ return( + style={{height: 80, width: 80, alignSelf: 'center'}}/> ) } diff --git a/EEG101/src/i18n/locales/en.js b/EEG101/src/i18n/locales/en.js index 8d4917f3..2dce3af2 100644 --- a/EEG101/src/i18n/locales/en.js +++ b/EEG101/src/i18n/locales/en.js @@ -240,6 +240,7 @@ export default { trainSamples: 'samples', trainStop: 'STOP', trainCollect: 'COLLECT', + trainCollectMore: 'COLLECT MORE (OPTIONAL)', trainOn: 'ON', trainOff: 'OFF', trainFitClassifier: 'FIT CLASSIFIER', diff --git a/EEG101/src/redux/reducer.js b/EEG101/src/redux/reducer.js index c30846f4..9e6f9441 100644 --- a/EEG101/src/redux/reducer.js +++ b/EEG101/src/redux/reducer.js @@ -44,14 +44,12 @@ export default function reducer(state = initialState, action = {}) { }; case SET_AVAILABLE_MUSES: - console.log(JSON.stringify(action.payload)); return { ...state, availableMuses: action.payload, }; case SET_MUSE_INFO: - console.log(JSON.stringify(action.payload)); return { ...state, museInfo: action.payload @@ -60,7 +58,8 @@ export default function reducer(state = initialState, action = {}) { case SET_OFFLINE_MODE: return { ...state, - isOfflineMode: action.payload + isOfflineMode: action.payload, + connectionStatus: config.connectionStatus.NO_MUSES }; case SET_MENU: diff --git a/EEG101/src/scenes/bci-01.js b/EEG101/src/scenes/bci-01.js index 2e4998e6..6b198915 100644 --- a/EEG101/src/scenes/bci-01.js +++ b/EEG101/src/scenes/bci-01.js @@ -3,6 +3,7 @@ import React, { Component } from "react"; import { StyleSheet, Text, View, ViewPagerAndroid, Image } from "react-native"; import { connect } from "react-redux"; import { MediaQueryStyleSheet } from "react-native-responsive"; +import config from "../redux/config"; import I18n from "../i18n/i18n"; import LinkButton from "../components/LinkButton"; import PopUp from "../components/PopUp"; @@ -13,6 +14,7 @@ import * as colors from "../styles/colors"; function mapStateToProps(state) { return { + connectionStatus: state.connectionStatus, dimensions: state.graphViewDimensions, isOfflineMode: state.isOfflineMode }; @@ -83,6 +85,16 @@ class BCIOne extends Component { title={I18n.t('machineLearningTitle')} > {I18n.t('machineLearningDefinition')} + this.props.history.push('/connectorOne')} + visible={ + this.props.connectionStatus === config.connectionStatus.DISCONNECTED + } + title={I18n.t('museDisconnectedTitle')} + > + {I18n.t('museDisconnectedDescription')} + + ); } diff --git a/EEG101/src/scenes/bci-02.js b/EEG101/src/scenes/bci-02.js index bb6244af..7d3ae796 100644 --- a/EEG101/src/scenes/bci-02.js +++ b/EEG101/src/scenes/bci-02.js @@ -17,6 +17,7 @@ import * as colors from "../styles/colors"; function mapStateToProps(state) { return { + connectionStatus: state.connectionStatus, dimensions: state.graphViewDimensions, bciAction: state.bciAction }; @@ -171,6 +172,16 @@ class BCITwo extends Component { + + this.props.history.push('/connectorOne')} + visible={ + this.props.connectionStatus === config.connectionStatus.DISCONNECTED + } + title={I18n.t('museDisconnectedTitle')} + > + {I18n.t('museDisconnectedDescription')} + ); } diff --git a/EEG101/src/scenes/bci-run.js b/EEG101/src/scenes/bci-run.js index a3bea53f..61c148cd 100644 --- a/EEG101/src/scenes/bci-run.js +++ b/EEG101/src/scenes/bci-run.js @@ -28,6 +28,7 @@ import * as colors from "../styles/colors"; function mapStateToProps(state) { return { + connectionStatus: state.connectionStatus, dimensions: state.graphViewDimensions, bciAction: state.bciAction }; @@ -40,7 +41,7 @@ class ClassifierRun extends Component { // Initialize States this.state = { popUp1Visible: false, - data: [1,1,1], + data: new Array(30).fill(1), noise: [], isRunning: false, }; @@ -153,6 +154,15 @@ class ClassifierRun extends Component { + this.props.history.push('/connectorOne')} + visible={ + this.props.connectionStatus === config.connectionStatus.DISCONNECTED + } + title={I18n.t('museDisconnectedTitle')} + > + {I18n.t('museDisconnectedDescription')} + ); } diff --git a/EEG101/src/scenes/bci-train.js b/EEG101/src/scenes/bci-train.js index 916c1dd3..8c5f9c87 100644 --- a/EEG101/src/scenes/bci-train.js +++ b/EEG101/src/scenes/bci-train.js @@ -15,6 +15,7 @@ import { setBCIAction } from "../redux/actions"; import config from "../redux/config.js"; import { MediaQueryStyleSheet } from "react-native-responsive"; import Classifier from "../interface/Classifier.js"; +import PopUp from "../components/PopUp"; import DecisionButton from "../components/DecisionButton.js"; import SandboxButton from "../components/SandboxButton.js"; import Button from "../components/Button.js"; @@ -25,6 +26,7 @@ import * as colors from "../styles/colors"; function mapStateToProps(state) { return { + connectionStatus: state.connectionStatus, bciAction: state.bciAction, dimensions: state.graphViewDimensions }; @@ -197,7 +199,7 @@ class BCITrain extends Component { - {I18n.t("trainAccuracy")}:{" "} + {I18n.t("trainAccuracy")}:{"\n"} {Math.round(this.state.score * 1000) / 1000} {I18n.t("trainReFit")} - Classifier.exportClassifier()}>EXPORT CLASSIFIER + Classifier.exportClassifier()}>EXPORT + this.props.history.push('/connectorOne')} + visible={ + this.props.connectionStatus === config.connectionStatus.DISCONNECTED + } + title={I18n.t('museDisconnectedTitle')} + > + {I18n.t('museDisconnectedDescription')} + ); } diff --git a/EEG101/src/scenes/slide-01-offline.js b/EEG101/src/scenes/slide-01-offline.js deleted file mode 100644 index ff203691..00000000 --- a/EEG101/src/scenes/slide-01-offline.js +++ /dev/null @@ -1,268 +0,0 @@ -import React, { Component } from "react"; -import { StyleSheet, Text, View, ViewPagerAndroid, Image } from "react-native"; -import { connect } from "react-redux"; -import config from "../redux/config"; -import { bindActionCreators } from "redux"; -import { setGraphViewDimensions } from "../redux/actions"; -import LinkButton from "../components/LinkButton"; -import PopUp from "../components/PopUp"; -import PopUpLink from "../components/PopUpLink"; -import { MediaQueryStyleSheet } from "react-native-responsive"; -import I18n from '../i18n/i18n'; -import * as colors from "../styles/colors"; - -//Interfaces. For elements that bridge to native -import GraphView from "../interface/GraphView"; - -// Sets isVisible prop by comparing state.scene.key (active scene) to the key of the wrapped scene -function mapStateToProps(state) { - return { - connectionStatus: state.connectionStatus, - isOfflineMode: state.isOfflineMode, - }; -} - -// Binds actions to component's props -function mapDispatchToProps(dispatch) { - return bindActionCreators( - { - setGraphViewDimensions - }, - dispatch - ); -} - -class SlideOne extends Component { - constructor(props) { - super(props); - - // Initialize States - this.state = { - popUp1Visible: false, - popUp2Visible: false, - popUp3Visible: false, - popUp4Visible: false, - slidePosition: 0 - }; - } - - offlineDataSource(slidePosition) { - console.log(slidePosition + 'slidePosition') - if(this.props.isOfflineMode){ - switch (slidePosition) { - case 0: - return "clean"; - break; - case 1: - return "blinks" - break; - case 2: - return "cat"; - break; - case 3: - return "relax"; - break; - } - } - } - - render() { - return ( - - - { - // Captures the width and height of the graphContainer to determine overlay positioning properties in PSDGraph - let { x, y, width, height } = event.nativeEvent.layout; - this.props.setGraphViewDimensions({ - x: x, - y: y, - width: width, - height: height - }); - }} - > - - - - {I18n.t('introductionSlideTitle')} - - - this.setState({ slidePosition: e.nativeEvent.position })} - > - - - {this.props.isOfflineMode ? I18n.t('brainElectricityOffline') : I18n.t('brainElectricity')} - - {I18n.t('usingThe')} this.setState({ popUp1Visible: true })}>{I18n.t('EEGLink')}{this.props.isOfflineMode ? I18n.t('deviceCanDetectOffline') : I18n.t('deviceCanDetect')} - - - - - - {I18n.t('tryBlinkingEyes')} - {I18n.t('doesSignalChange')} - - {I18n.t('eyeMovementCreates')} this.setState({ popUp2Visible: true })}>{I18n.t('noiseLink')}{I18n.t('inEEGSignal')} - - - - - {I18n.t('tryThinkingAbout')} - {I18n.t('doesSignalChange')} - - {I18n.t('althoughEEG')} this.setState({ popUp3Visible: true })}>{I18n.t('readingMindsLink')}. - - - - - {I18n.t('tryClosingEyes10')} - - {I18n.t('mayNoticeSignalChange')} this.setState({ popUp4Visible: true })}>{I18n.t('alphaWavesLink')} - - {I18n.t('nextLink')} - - - - - this.setState({ popUp1Visible: false })} - visible={this.state.popUp1Visible} - title={I18n.t('whatIsEEGTitle')} - image={require("../assets/hansberger.jpg")} - > - {I18n.t('whatIsEEGDescription')} - - - this.setState({ popUp2Visible: false })} - visible={this.state.popUp2Visible} - title={I18n.t('noiseTitle')} - > - {I18n.t('noiseDescription')} - - - this.setState({ popUp3Visible: false })} - visible={this.state.popUp3Visible} - title={I18n.t('cannotReadMindsTitle')} - > - {I18n.t('cannotReadMindsDescription')} - - - this.setState({ popUp4Visible: false })} - visible={this.state.popUp4Visible} - title={I18n.t('eyeRythymsTitle')} - > - {I18n.t('eyeRythymsDescription')} - - - this.props.history.push('/connectorOne')} - visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED - } - title={I18n.t('museDisconnectedTitle')} - > - {I18n.t('museDisconnectedDescription')} - - - ); - } -} - -export default connect(mapStateToProps, mapDispatchToProps)(SlideOne); - -const styles = MediaQueryStyleSheet.create( - // Base styles - { - pageStyle: { - padding: 15, - alignItems: "stretch", - justifyContent: "space-around" - }, - - currentTitle: { - marginLeft: 20, - marginTop: 10, - fontSize: 13, - fontFamily: "Roboto-Medium", - color: colors.skyBlue - }, - - body: { - fontFamily: "Roboto-Light", - color: colors.black, - fontSize: 19 - }, - - container: { - backgroundColor: colors.white, - flex: 1, - justifyContent: "space-around", - alignItems: "stretch" - }, - - graphContainer: { - flex: 4, - justifyContent: "center", - alignItems: "stretch" - }, - - sandboxButtonContainer: { - position: "absolute", - right: 5, - top: 5 - }, - - header: { - fontFamily: "Roboto-Bold", - color: colors.black, - fontSize: 20 - }, - - viewPager: { - borderWidth: 1, - flex: 4 - }, - - swipeImage: { - height: 40, - alignSelf: "center" - } - }, - // Responsive styles - { - "@media (min-device-height: 700)": { - viewPager: { - flex: 3 - }, - - header: { - fontSize: 30 - }, - - currentTitle: { - fontSize: 20 - }, - - body: { - fontSize: 25 - }, - - swipeImage: { - height: 75, - width: 75 - } - } - } -); diff --git a/EEG101/src/scenes/slide-01.js b/EEG101/src/scenes/slide-01.js index c7190a9d..01dbfa5c 100644 --- a/EEG101/src/scenes/slide-01.js +++ b/EEG101/src/scenes/slide-01.js @@ -18,6 +18,7 @@ import GraphView from "../interface/GraphView"; function mapStateToProps(state) { return { connectionStatus: state.connectionStatus, + isOfflineMode: state.isOfflineMode, }; } @@ -37,6 +38,7 @@ class SlideOne extends Component { // Initialize States this.state = { + slidePosition: 0, popUp1Visible: false, popUp2Visible: false, popUp3Visible: false, @@ -44,6 +46,25 @@ class SlideOne extends Component { }; } + offlineDataSource(slidePosition) { + if(this.props.isOfflineMode){ + switch (slidePosition) { + case 0: + return "clean"; + break; + case 1: + return "blinks" + break; + case 2: + return "cat"; + break; + case 3: + return "relax"; + break; + } + } + } + render() { return ( @@ -60,8 +81,11 @@ class SlideOne extends Component { height: height }); }} + // Receives a native callback event e that is used to set slidePosition state + onPageSelected={e => + this.setState({ slidePosition: e.nativeEvent.position })} > - + {I18n.t('introductionSlideTitle')} diff --git a/EEG101/src/scenes/slide-03.js b/EEG101/src/scenes/slide-03.js index a58f60bc..d8a44f62 100644 --- a/EEG101/src/scenes/slide-03.js +++ b/EEG101/src/scenes/slide-03.js @@ -136,7 +136,7 @@ class SlideThree extends Component { this.props.history.push("/connectorOne")} visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED + this.props.connectionStatus === config.connectionStatus.DISCONNECTED } title={I18n.t("museDisconnectedTitle")} > diff --git a/EEG101/src/scenes/slide-04.js b/EEG101/src/scenes/slide-04.js index a61fbbf0..484096e5 100644 --- a/EEG101/src/scenes/slide-04.js +++ b/EEG101/src/scenes/slide-04.js @@ -95,7 +95,7 @@ class SlideFour extends Component { this.props.history.push("/connectorOne")} visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED + this.props.connectionStatus === config.connectionStatus.DISCONNECTED } title={I18n.t("museDisconnectedTitle")} > diff --git a/EEG101/src/scenes/slide-05.js b/EEG101/src/scenes/slide-05.js index 8d7f0ec9..37b5a4f7 100644 --- a/EEG101/src/scenes/slide-05.js +++ b/EEG101/src/scenes/slide-05.js @@ -101,7 +101,7 @@ class SlideFive extends Component { this.props.history.push('/connectorOne')} visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED + this.props.connectionStatus === config.connectionStatus.DISCONNECTED } title={I18n.t('museDisconnectedTitle')} > diff --git a/EEG101/src/scenes/slide-06.js b/EEG101/src/scenes/slide-06.js index 67f124da..227b9dba 100644 --- a/EEG101/src/scenes/slide-06.js +++ b/EEG101/src/scenes/slide-06.js @@ -65,7 +65,7 @@ class SlideSix extends Component { this.props.history.push('/connectorOne')} visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED + this.props.connectionStatus === config.connectionStatus.DISCONNECTED } title={I18n.t('museDisconnectedTitle')} > diff --git a/EEG101/src/scenes/slide-08.js b/EEG101/src/scenes/slide-08.js index 105a87da..ca2908df 100644 --- a/EEG101/src/scenes/slide-08.js +++ b/EEG101/src/scenes/slide-08.js @@ -91,7 +91,7 @@ class SlideEight extends Component { this.props.history.push("/connectorOne")} visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED + this.props.connectionStatus === config.connectionStatus.DISCONNECTED } title={I18n.t("museDisconnectedTitle")} > diff --git a/EEG101/src/scenes/slide-09.js b/EEG101/src/scenes/slide-09.js index 9c33c4ae..a4483204 100644 --- a/EEG101/src/scenes/slide-09.js +++ b/EEG101/src/scenes/slide-09.js @@ -124,7 +124,7 @@ class SlideNine extends Component { this.props.history.push("/connectorOne")} visible={ - this.props.connectionStatus === config.connectionStatus.DISCONNECTED + this.props.connectionStatus === config.connectionStatus.DISCONNECTED } title={I18n.t("museDisconnectedTitle")} >