1 Star 0 Fork 1

tuanergou/mi_app_compact

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
lslSender.py 980 Bytes
一键复制 编辑 原始数据 按行查看 历史
tuanergou 提交于 2024-04-05 11:45 . project initialization
# -*- coding: utf-8 -*-
# from collections import deque
import pylsl
class LSLSender(object):
"""docstring for DataPrc"""
def __init__(self, arg):
super(LSLSender, self).__init__()
self.arg = arg
info_eeg = pylsl.stream_info('mi_eeg','eeg',8,128,pylsl.cf_int32,'mi')
self.outlet_eeg = pylsl.stream_outlet(info_eeg)
info_acc = pylsl.stream_info('mi_acc','acc',4,12.8,pylsl.cf_float32,'mi')
self.outlet_acc = pylsl.stream_outlet(info_acc)
info_eeg_hb = pylsl.stream_info('hb_eeg','eeg',1,128,pylsl.cf_int32,'hb')
self.outlet_eeg_hb = pylsl.stream_outlet(info_eeg_hb)
def send_eeg(self,e):
mysample = pylsl.vectorf(e)
self.outlet_eeg.push_sample(mysample)
def send_acc(self,a):
mysample = pylsl.vectorf(a)
self.outlet_acc.push_sample(mysample)
def send_eeg_hb(self,e):
mysample = pylsl.vectorf(e)
self.outlet_eeg_hb.push_sample(e)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/tuanergou/mi_app_compact.git
git@gitee.com:tuanergou/mi_app_compact.git
tuanergou
mi_app_compact
mi_app_compact
master

搜索帮助