qlsdk2 0.1.6__py3-none-any.whl → 0.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
qlsdk/ar4m/ar4sdk.py CHANGED
@@ -146,7 +146,7 @@ def _get_time():
146
146
 
147
147
  # ar4设备对象
148
148
  class AR4(object):
149
- def __init__(self, box_mac, slot, hub_name):
149
+ def __init__(self, box_mac:str, slot:int, hub_name:str):
150
150
  self._handle = None
151
151
  self._box_type = None
152
152
  self._box_mac = box_mac
@@ -169,7 +169,7 @@ class AR4(object):
169
169
  self._acq_info = {}
170
170
  # 回调函数
171
171
  self._data_callback = FuncAr4DataNotify(self._wrap_data_accept())
172
- self._trigger_callback = FuncAr4TriggerNotify(self._trigger_accept)
172
+ self._trigger_callback = FuncAr4TriggerNotify(self._wrap_trigger_accept())
173
173
 
174
174
  # 消息订阅
175
175
  self._consumers: dict[str, Queue] = {}
@@ -332,6 +332,14 @@ class AR4(object):
332
332
  for consumer in self._consumers.values():
333
333
  consumer.put(packet)
334
334
  # logger.debug(f"EEG数据: {packet}")
335
+
336
+ def _wrap_trigger_accept(self):
337
+
338
+ @FuncAr4DataNotify
339
+ def trigger_accept(handle, time_ms, trigger_type, trigger_value):
340
+ self._trigger_accept(time_ms, trigger_type, trigger_value)
341
+
342
+ return trigger_accept
335
343
 
336
344
  def _trigger_accept(self, time_ms, trigger_type, trigger_value):
337
345
  logger.info(f"_trigger_accept 被调用")
@@ -375,9 +383,12 @@ class AR4Packet(Packet):
375
383
  self.acc_count = data.acc_count
376
384
  # 读eeg数据
377
385
  if self.eeg_ch_count and self.eeg_count:
378
- self.eeg = [[] for _ in range(self.eeg_ch_count)]
379
- for i in range(self.eeg_ch_count):
380
- self.eeg[i] = [data.eeg[j + (i * self.eeg_count)] for j in range(self.eeg_count)]
386
+ # self.eeg = [[] for _ in range(self.eeg_ch_count)]
387
+ # for i in range(self.eeg_ch_count):
388
+ # self.eeg[i] = [data.eeg[j + (i * self.eeg_count)] for j in range(self.eeg_count)]
389
+ # tmp = data.eeg[:self.eeg_ch_count * self.eeg_count]
390
+ # logger.info(tmp)
391
+ self.eeg = [data.eeg[i:self.eeg_count*self.eeg_ch_count:self.eeg_ch_count] for i in range(self.eeg_ch_count)]
381
392
  # 读acc数据
382
393
  if self.acc_ch_count and self.acc_count:
383
394
  self.acc = [[] for _ in range(self.acc_ch_count)]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qlsdk2
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: SDK for quanlan device
5
5
  Home-page: https://github.com/hehuajun/qlsdk
6
6
  Author: hehuajun
@@ -1,9 +1,9 @@
1
1
  qlsdk/__init__.py,sha256=pHMMwFiz7AGYlWvxo-81Obd7gIkojhLAEUGe0yuiAJI,372
2
2
  qlsdk/ar4m/__init__.py,sha256=HCFv58t9vYoH2nNN9EiswwdRngiDmh_7h-uwhW-id1I,1784
3
- qlsdk/ar4m/ar4sdk.py,sha256=bIgjVm5NA3dLYcfNJ9t2oJm-R_yBxrT3a2SDlntr7zA,14838
3
+ qlsdk/ar4m/ar4sdk.py,sha256=M244in6ytN8f-PI7lIbt8BfEE_DcjAsE06iLxI7xNeY,15358
4
4
  qlsdk/ar4m/libs/libAr4SDK.dll,sha256=kZp9_DRwPdAJ5OgTFQSqS8tEETxUs7YmmETuBP2g60U,15402132
5
5
  qlsdk/ar4m/libs/libwinpthread-1.dll,sha256=W77ySaDQDi0yxpnQu-ifcU6-uHKzmQpcvsyx2J9j5eg,52224
6
- qlsdk2-0.1.6.dist-info/METADATA,sha256=DKHe7l7vZIYUHzglcBzEDae7oM14GoULBVcRvpGT3WA,7001
7
- qlsdk2-0.1.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
8
- qlsdk2-0.1.6.dist-info/top_level.txt,sha256=2CHzn0SY-NIBVyBl07Suh-Eo8oBAQfyNPtqQ_aDatBg,6
9
- qlsdk2-0.1.6.dist-info/RECORD,,
6
+ qlsdk2-0.1.7.dist-info/METADATA,sha256=ynZ7zTy2_H7Hney0pXE-GgVERk9dgvaLoCierdAim8U,7001
7
+ qlsdk2-0.1.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
8
+ qlsdk2-0.1.7.dist-info/top_level.txt,sha256=2CHzn0SY-NIBVyBl07Suh-Eo8oBAQfyNPtqQ_aDatBg,6
9
+ qlsdk2-0.1.7.dist-info/RECORD,,
File without changes