1- import os
2-
31from eegnb import generate_save_fn
4- from eegnb .devices . eeg import EEG
2+ from eegnb .devices import EEGDevice
53from .utils import run_experiment , get_exp_desc , experiments
64
75
8- def device_prompt () -> EEG :
6+ def device_prompt () -> EEGDevice :
97 # define the names of the available boards
108 # boards is a mapping from board code to board description
119 boards = {
@@ -51,9 +49,7 @@ def device_prompt() -> EEG:
5149 board_code = board_code + "_wifi"
5250 if board_code == "ganglion" :
5351 # If the Ganglion is being used, you can enter optional Ganglion mac address
54- ganglion_mac_address = input (
55- "\n Ganglion MAC Address (Press Enter to Autoscan): "
56- )
52+ mac_address = input ("\n Ganglion MAC Address (Press Enter to Autoscan): " )
5753 elif board_code == "ganglion_wifi" :
5854 # IP address is required for this board configuration
5955 ip_address = input ("\n Enter Ganglion+WiFi IP Address: " )
@@ -66,13 +62,11 @@ def device_prompt() -> EEG:
6662 # initialize the EEG device
6763 if board_code .startswith ("ganglion" ):
6864 if board_code == "ganglion_wifi" :
69- eeg_device = EEG ( device = board_code , ip_addr = ip_address )
65+ return EEGDevice . create ( device_name = board_code , ip_addr = ip_address )
7066 else :
71- eeg_device = EEG ( device = board_code , mac_addr = ganglion_mac_address )
67+ return EEGDevice . create ( device_name = board_code , mac_addr = mac_address )
7268 else :
73- eeg_device = EEG (device = board_code )
74-
75- return eeg_device
69+ return EEGDevice .create (device_name = board_code )
7670
7771
7872def exp_prompt ():
0 commit comments