add buffer
This commit is contained in:
@@ -9,29 +9,28 @@ from PubLibrary.InifileHelper import IniRead
|
||||
|
||||
def get_device_info(device_type):
|
||||
|
||||
|
||||
section = f'device_type_{device_type}'
|
||||
device_info = {
|
||||
'device_sample_rate': int(IniRead(section, 'sample_rate')) if IniRead(section, 'sample_rate') is not None else 250,
|
||||
|
||||
''
|
||||
'sample_rate': int(IniRead(section, 'sample_rate')) if IniRead(section, 'sample_rate') is not None else 250,
|
||||
'channel_nums': int(IniRead(section, 'channel_nums')) if IniRead(section, 'channel_nums') is not None else 66,
|
||||
'channel_names': IniRead(section, 'channel_names') if IniRead(section, 'channel_names') is not None else None,
|
||||
'channel_index': IniRead(section, 'channel_index') if IniRead(section, 'channel_index') is not None else None,
|
||||
}
|
||||
|
||||
return device_info
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if not is_program_running():
|
||||
# 解析命令行参数
|
||||
parser = argparse.ArgumentParser(description="EEG Decoder Application")
|
||||
parser.add_argument('-dt', '-t','--device-type', type=int, default=None, help="Device Type")
|
||||
# parser = argparse.ArgumentParser(description="EEG Decoder Application")
|
||||
# parser.add_argument('-dt', '-t','--device-type', type=int, default=None, help="Device Type")
|
||||
# parser.add_argument('-dh', '--device-host', type=str, default=None, help="Device Host IP")
|
||||
# parser.add_argument('-dp', '--device-port', type=int, default=None, help="Device Port")
|
||||
# parser.add_argument('-uh', '--upper-host', type=str, default=None, help="Upper Computer Host IP")
|
||||
# parser.add_argument('-up', '--upper-port', type=int, default=None, help="Upper Computer Port")
|
||||
# args = parser.parse_args()
|
||||
|
||||
args = parser.parse_args()
|
||||
device_info= get_device_info(args.device_type)
|
||||
|
||||
|
||||
decoder = Decoder_main(device_info=device_info)
|
||||
# decoder.connect(
|
||||
# device_type=args.device_type,
|
||||
# device_host=args.device_host,
|
||||
@@ -40,6 +39,9 @@ if __name__ == "__main__":
|
||||
# upper_port=args.upper_port
|
||||
# )
|
||||
|
||||
device_info= get_device_info(1)
|
||||
decoder = Decoder_main(device_info=device_info)
|
||||
|
||||
try:
|
||||
decoder.start()
|
||||
while not decoder.zmqServer.IsExitApp:
|
||||
|
||||
Reference in New Issue
Block a user