An easy-to-use platform for EEG experimentation in the classroom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed issue where null devices were showing up after Muse fix

+7 -12
+2 -1
app/epics/deviceEpics.js
··· 84 84 pluck('payload'), 85 85 filter(status => status === DEVICE_AVAILABILITY.SEARCHING), 86 86 map(getMuse), 87 + tap(console.log), 87 88 mergeMap(promise => 88 89 promise.then( 89 90 devices => devices, 90 91 error => { 91 92 toast.error(`"Device Error: " ${error.toString()}`); 92 - toast.error('Device Error: ', error); 93 93 return []; 94 94 } 95 95 ) 96 96 ), 97 + filter(devices => devices), // filter out nulls if running on win7 97 98 filter(devices => devices.length >= 1), 98 99 map(deviceFound) 99 100 );
-8
app/epics/experimentEpics.js
··· 98 98 99 99 const startEpic = (action$, state$) => 100 100 action$.ofType(START).pipe( 101 - tap(console.log), 102 101 filter(() => !state$.value.experiment.isRunning), 103 102 map(() => { 104 103 if ( ··· 143 142 const setSubjectEpic = action$ => 144 143 action$.ofType(SET_SUBJECT).pipe(map(updateSession)); 145 144 146 - // TODO: Refactor this to use redux-observable state stream 147 145 const updateSessionEpic = (action$, state$) => 148 146 action$.ofType(UPDATE_SESSION).pipe( 149 147 mergeMap(() => ··· 162 160 }), 163 161 map(setSession) 164 162 ); 165 - 166 - // const sessionCountEpic = (action$, state$) => 167 - // action$.ofType(STOP).pipe( 168 - // filter(() => state$.value.experiment.isRunning), 169 - // map(() => setSession(state$.value.experiment.session + 1)) 170 - // ); 171 163 172 164 const autoSaveEpic = action$ => 173 165 action$.ofType("@@router/LOCATION_CHANGE").pipe(
+5 -2
app/utils/eeg/muse.js
··· 31 31 export const getMuse = async () => { 32 32 let device = {}; 33 33 if (process.platform === "win32") { 34 - if (release().split(".")[0] >= 10) { 34 + if (release().split(".")[0] < 10) { 35 + console.log('win 7 ') 36 + return null 37 + } 35 38 device = await bluetooth.requestDevice({ 36 39 filters: [{ services: [MUSE_SERVICE] }] 37 40 }); 38 - } 41 + 39 42 } else { 40 43 device = await navigator.bluetooth.requestDevice({ 41 44 filters: [{ services: [MUSE_SERVICE] }]
-1
app/utils/jspsych/functions.js
··· 143 143 // Gets the last set of behavioural (key press) data stored in jsPsych 144 144 export const getBehaviouralData = () => { 145 145 const rawData = jsPsych.data.get().values(); 146 - console.log(rawData); 147 146 148 147 // Mutate rawData array to customize behavioural results output 149 148 for (let index = 0; index < rawData.length; index++) {