sensor-sdk 0.0.3__py3-none-any.whl → 0.0.4__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.

Potentially problematic release.


This version of sensor-sdk might be problematic. Click here for more details.

sensor/sensor_device.py CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  # 详细设备信息
4
2
  # 该类用于存储设备的详细信息,包括设备名称、型号、硬件和固件版本、各种通道数量以及 MTU 大小
5
3
  from enum import Enum
@@ -24,40 +22,41 @@ class DeviceInfo:
24
22
  # def __init__(self, device_name: str, model_name: str, hardware_version: str, firmware_version: str,
25
23
  # emg_channel_count: int, eeg_channel_count: int, ecg_channel_count: int,
26
24
  # acc_channel_count: int, gyro_channel_count: int, brth_channel_count: int, mtu_size: int):
27
- # self.DeviceName = device_name
28
- # self.ModelName = model_name
29
- # self.HardwareVersion = hardware_version
30
- # self.FirmwareVersion = firmware_version
31
- # self.EmgChannelCount = emg_channel_count
32
- # self.EegChannelCount = eeg_channel_count
33
- # self.EcgChannelCount = ecg_channel_count
34
- # self.AccChannelCount = acc_channel_count
35
- # self.GyroChannelCount = gyro_channel_count
36
- # self.BrthChannelCount = brth_channel_count
37
- # self.MTUSize = mtu_size
25
+ # self.DeviceName = device_name
26
+ # self.ModelName = model_name
27
+ # self.HardwareVersion = hardware_version
28
+ # self.FirmwareVersion = firmware_version
29
+ # self.EmgChannelCount = emg_channel_count
30
+ # self.EegChannelCount = eeg_channel_count
31
+ # self.EcgChannelCount = ecg_channel_count
32
+ # self.AccChannelCount = acc_channel_count
33
+ # self.GyroChannelCount = gyro_channel_count
34
+ # self.BrthChannelCount = brth_channel_count
35
+ # self.MTUSize = mtu_size
38
36
 
39
37
  def __init__(self):
40
- self.DeviceName = ""
41
- self.ModelName = ""
42
- self.HardwareVersion = ""
43
- self.FirmwareVersion = ""
44
- self.EmgChannelCount = 0
45
- self.EegChannelCount = 0
46
- self.EcgChannelCount = 0
47
- self.AccChannelCount = 0
48
- self.GyroChannelCount = 0
49
- self.BrthChannelCount = 0
50
- self.MTUSize = 0
38
+ self.DeviceName = ""
39
+ self.ModelName = ""
40
+ self.HardwareVersion = ""
41
+ self.FirmwareVersion = ""
42
+ self.EmgChannelCount = 0
43
+ self.EegChannelCount = 0
44
+ self.EcgChannelCount = 0
45
+ self.AccChannelCount = 0
46
+ self.GyroChannelCount = 0
47
+ self.BrthChannelCount = 0
48
+ self.MTUSize = 0
49
+
51
50
 
52
51
  class DeviceStateEx(Enum):
53
- Disconnected = 0
54
- Connecting = 1
55
- Connected = 2
56
- Ready = 3
57
- Disconnecting = 4
58
- Invalid = 5
52
+ Disconnected = 0
53
+ Connecting = 1
54
+ Connected = 2
55
+ Ready = 3
56
+ Disconnecting = 4
57
+ Invalid = 5
58
+
59
59
 
60
-
61
60
  # 蓝牙设备信息
62
61
  # 该类用于存储蓝牙设备的基本信息,包括设备名称、地址和信号强度
63
62
  class BLEDevice:
@@ -67,9 +66,10 @@ class BLEDevice:
67
66
  :param address (str): 设备地址
68
67
  :param rssi (int): 信号强度
69
68
  """
69
+
70
70
  def __init__(self, name: str, address: str, rssi: int):
71
71
 
72
72
  # 初始化函数,用于创建一个Beacon对象
73
- self.Name = name # 设置Beacon的名称
74
- self.Address = address # 设置Beacon的地址
75
- self.RSSI = rssi
73
+ self.Name = name # 设置Beacon的名称
74
+ self.Address = address # 设置Beacon的地址
75
+ self.RSSI = rssi
sensor/sensor_profile.py CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  # 设备状态枚举
4
2
  # 该枚举类定义了设备的各种状态,用于表示设备在不同操作阶段的状态信息
5
3
  from enum import Enum, IntEnum
@@ -42,7 +40,12 @@ class SensorProfile:
42
40
  包含回调函数,用于处理传感器的状态变化、错误、数据接收和电量变化等事件。
43
41
  """
44
42
 
45
- def __init__(self, device: bleak.BLEDevice, adv: bleak.AdvertisementData, gforce_event_loop: asyncio.AbstractEventLoop):
43
+ def __init__(
44
+ self,
45
+ device: bleak.BLEDevice,
46
+ adv: bleak.AdvertisementData,
47
+ gforce_event_loop: asyncio.AbstractEventLoop,
48
+ ):
46
49
  """
47
50
  初始化 SensorProfile 类的实例。
48
51
 
@@ -51,18 +54,18 @@ class SensorProfile:
51
54
  self._detail_device = device
52
55
  self._device = BLEDevice(device.name, device.address, adv.rssi)
53
56
  self._device_state = DeviceStateEx.Disconnected
54
- self._on_state_changed: Callable[['SensorProfile', DeviceStateEx], None] = None
55
- self._on_error_callback: Callable[['SensorProfile', str], None] = None
56
- self._on_data_callback: Callable[['SensorProfile', SensorData], None] = None
57
- self._on_power_changed: Callable[['SensorProfile', int], None] = None
57
+ self._on_state_changed: Callable[["SensorProfile", DeviceStateEx], None] = None
58
+ self._on_error_callback: Callable[["SensorProfile", str], None] = None
59
+ self._on_data_callback: Callable[["SensorProfile", SensorData], None] = None
60
+ self._on_power_changed: Callable[["SensorProfile", int], None] = None
58
61
  self._power = -1
59
62
  self._power_interval = 0
60
63
  self._adv = adv
61
64
  self._data_ctx: SensorProfileDataCtx = None
62
65
  self._gforce: GForce = None
63
- self._data_event_loop:asyncio.AbstractEventLoop = None
64
- self._gforce_event_loop:asyncio.AbstractEventLoop = gforce_event_loop
65
- self._event_loop:asyncio.AbstractEventLoop = None
66
+ self._data_event_loop: asyncio.AbstractEventLoop = None
67
+ self._gforce_event_loop: asyncio.AbstractEventLoop = gforce_event_loop
68
+ self._event_loop: asyncio.AbstractEventLoop = None
66
69
  self._event_thread = None
67
70
 
68
71
  def __del__(self) -> None:
@@ -73,23 +76,26 @@ class SensorProfile:
73
76
  self._destroy()
74
77
 
75
78
  def _destroy(self):
76
- if self._device_state == DeviceStateEx.Connected or self._device_state == DeviceStateEx.Ready:
79
+ if (
80
+ self._device_state == DeviceStateEx.Connected
81
+ or self._device_state == DeviceStateEx.Ready
82
+ ):
77
83
  self.disconnect()
78
- if (self._data_event_loop != None):
84
+ if self._data_event_loop != None:
79
85
  try:
80
86
  self._data_event_loop.stop()
81
87
  self._data_event_loop.close()
82
88
  self._data_event_thread.join()
83
89
  except Exception as e:
84
90
  pass
85
- if (self._event_loop != None):
91
+ if self._event_loop != None:
86
92
  try:
87
93
  self._event_loop.stop()
88
94
  self._event_loop.close()
89
95
  self._event_thread.join()
90
96
  except Exception as e:
91
97
  pass
92
-
98
+
93
99
  @property
94
100
  def deviceState(self) -> DeviceStateEx:
95
101
  """
@@ -104,7 +110,9 @@ class SensorProfile:
104
110
  self._device_state = newState
105
111
  if self._on_state_changed != None:
106
112
  try:
107
- self._event_loop.call_soon_threadsafe(self._on_state_changed,self, newState)
113
+ self._event_loop.call_soon_threadsafe(
114
+ self._on_state_changed, self, newState
115
+ )
108
116
  except Exception as e:
109
117
  print(e)
110
118
  pass
@@ -141,7 +149,7 @@ class SensorProfile:
141
149
  return self._device
142
150
 
143
151
  @property
144
- def onStateChanged(self) -> Callable[['SensorProfile', DeviceStateEx], None]:
152
+ def onStateChanged(self) -> Callable[["SensorProfile", DeviceStateEx], None]:
145
153
  """
146
154
  获取状态变化的回调函数。
147
155
 
@@ -150,7 +158,9 @@ class SensorProfile:
150
158
  return self._on_state_changed
151
159
 
152
160
  @onStateChanged.setter
153
- def onStateChanged(self, callback: Callable[['SensorProfile', DeviceStateEx], None]):
161
+ def onStateChanged(
162
+ self, callback: Callable[["SensorProfile", DeviceStateEx], None]
163
+ ):
154
164
  """
155
165
  设置状态变化的回调函数。
156
166
 
@@ -159,7 +169,7 @@ class SensorProfile:
159
169
  self._on_state_changed = callback
160
170
 
161
171
  @property
162
- def onErrorCallback(self) -> Callable[['SensorProfile', str], None]:
172
+ def onErrorCallback(self) -> Callable[["SensorProfile", str], None]:
163
173
  """
164
174
  获取错误回调函数。
165
175
 
@@ -168,7 +178,7 @@ class SensorProfile:
168
178
  return self._on_error_callback
169
179
 
170
180
  @onErrorCallback.setter
171
- def onErrorCallback(self, callback: Callable[['SensorProfile', str], None]):
181
+ def onErrorCallback(self, callback: Callable[["SensorProfile", str], None]):
172
182
  """
173
183
  设置错误回调函数。
174
184
 
@@ -177,7 +187,7 @@ class SensorProfile:
177
187
  self._on_error_callback = callback
178
188
 
179
189
  @property
180
- def onDataCallback(self) -> Callable[['SensorProfile', SensorData], None]:
190
+ def onDataCallback(self) -> Callable[["SensorProfile", SensorData], None]:
181
191
  """
182
192
  获取数据接收的回调函数。
183
193
 
@@ -186,7 +196,7 @@ class SensorProfile:
186
196
  return self._on_data_callback
187
197
 
188
198
  @onDataCallback.setter
189
- def onDataCallback(self, callback: Callable[['SensorProfile', SensorData], None]):
199
+ def onDataCallback(self, callback: Callable[["SensorProfile", SensorData], None]):
190
200
  """
191
201
  设置数据接收的回调函数。
192
202
 
@@ -195,7 +205,7 @@ class SensorProfile:
195
205
  self._on_data_callback = callback
196
206
 
197
207
  @property
198
- def onPowerChanged(self) -> Callable[['SensorProfile', int], None]:
208
+ def onPowerChanged(self) -> Callable[["SensorProfile", int], None]:
199
209
  """
200
210
  获取电量变化的回调函数。
201
211
 
@@ -204,17 +214,22 @@ class SensorProfile:
204
214
  return self._on_power_changed
205
215
 
206
216
  @onPowerChanged.setter
207
- def onPowerChanged(self, callback: Callable[['SensorProfile', int], None]):
217
+ def onPowerChanged(self, callback: Callable[["SensorProfile", int], None]):
208
218
  """
209
219
  设置电量变化的回调函数。
210
220
 
211
221
  :param callback (Callable[['SensorProfile', int], None]): 电量变化的回调函数。
212
222
  """
213
223
  self._on_power_changed = callback
224
+
214
225
  async def _connect(self) -> bool:
215
- if self.deviceState == DeviceStateEx.Connected or self.deviceState == DeviceStateEx.Ready:
226
+ if (
227
+ self.deviceState == DeviceStateEx.Connected
228
+ or self.deviceState == DeviceStateEx.Ready
229
+ ):
216
230
  return True
217
231
  self._set_device_state(DeviceStateEx.Connecting)
232
+
218
233
  def handle_disconnect(_: BleakClient):
219
234
  self.stopDataNotification()
220
235
  self._data_ctx.close()
@@ -227,16 +242,17 @@ class SensorProfile:
227
242
 
228
243
  await self._gforce.connect(handle_disconnect, self._raw_data_buf)
229
244
 
230
- if (self._gforce.client.is_connected):
245
+ if self._gforce.client.is_connected:
231
246
  self._set_device_state(DeviceStateEx.Connected)
232
- if (self._gforce.client.mtu_size >= 80):
247
+ if self._gforce.client.mtu_size >= 80:
233
248
  self._set_device_state(DeviceStateEx.Ready)
234
249
  else:
235
250
  self.disconnect()
236
251
  else:
237
252
  self._set_device_state(DeviceStateEx.Disconnected)
238
-
253
+
239
254
  return True
255
+
240
256
  def connect(self) -> bool:
241
257
  """
242
258
  连接传感器。
@@ -244,47 +260,66 @@ class SensorProfile:
244
260
  :return: bool: 如果连接成功,返回 True;否则返回 False。
245
261
 
246
262
  """
247
- if (self._event_thread == None):
263
+ if self._event_thread == None:
248
264
  self._event_loop = asyncio.new_event_loop()
249
- self._event_thread = threading.Thread(target=start_loop, args=(self._event_loop,))
265
+ self._event_thread = threading.Thread(
266
+ target=start_loop, args=(self._event_loop,)
267
+ )
250
268
  self._event_thread.daemon = True
251
269
  self._event_thread.name = self._device.Name + " event"
252
270
  self._event_thread.start()
253
271
  self._data_buffer: Queue[SensorData] = Queue()
254
272
  self._raw_data_buf: Queue[bytes] = Queue()
255
273
 
256
- if (self._gforce == None):
257
- if (self._adv.service_data.get(SERVICE_GUID) != None):
274
+ if self._gforce == None:
275
+ if self._adv.service_data.get(SERVICE_GUID) != None:
258
276
  # print("OYM_SERVICE:" + self._detail_device.name)
259
- self._gforce = GForce(self._detail_device, OYM_CMD_NOTIFY_CHAR_UUID, OYM_DATA_NOTIFY_CHAR_UUID, False)
260
- elif (self._adv.service_data.get(RFSTAR_SERVICE_GUID) != None):
277
+ self._gforce = GForce(
278
+ self._detail_device,
279
+ OYM_CMD_NOTIFY_CHAR_UUID,
280
+ OYM_DATA_NOTIFY_CHAR_UUID,
281
+ False,
282
+ )
283
+ elif self._adv.service_data.get(RFSTAR_SERVICE_GUID) != None:
261
284
  # print("RFSTAR_SERVICE:" + self._detail_device.name)
262
- self._gforce = GForce(self._detail_device, RFSTAR_CMD_UUID, RFSTAR_DATA_UUID, True)
263
- self._data_event_loop = asyncio.new_event_loop()
264
- self._data_event_thread = threading.Thread(target=start_loop, args=(self._data_event_loop,))
285
+ self._gforce = GForce(
286
+ self._detail_device, RFSTAR_CMD_UUID, RFSTAR_DATA_UUID, True
287
+ )
288
+ self._data_event_loop = asyncio.new_event_loop()
289
+ self._data_event_thread = threading.Thread(
290
+ target=start_loop, args=(self._data_event_loop,)
291
+ )
265
292
  self._data_event_thread.daemon = True
266
293
  self._data_event_thread.name = self._detail_device.name + " data"
267
294
  self._data_event_thread.start()
268
295
  else:
269
- print("Invalid device service uuid:" + self._detail_device.name + str(self._adv))
296
+ print(
297
+ "Invalid device service uuid:"
298
+ + self._detail_device.name
299
+ + str(self._adv)
300
+ )
270
301
  return False
271
302
 
272
-
273
- if (self._data_ctx == None and self._gforce != None):
274
- self._data_ctx = SensorProfileDataCtx(self._gforce, self._device.Address, self._raw_data_buf)
275
- if (self._data_ctx.isUniversalStream):
303
+ if self._data_ctx == None and self._gforce != None:
304
+ self._data_ctx = SensorProfileDataCtx(
305
+ self._gforce, self._device.Address, self._raw_data_buf
306
+ )
307
+ if self._data_ctx.isUniversalStream:
276
308
  timer(self._data_event_loop, 0, self._process_universal_data())
277
309
 
278
310
  result = sync_timer(self._gforce_event_loop, 0, self._connect())
279
311
  return result
280
312
 
281
313
  async def _waitForDisconnect(self) -> bool:
282
- while(self.deviceState != DeviceStateEx.Disconnected):
314
+ while self.deviceState != DeviceStateEx.Disconnected:
283
315
  asyncio.sleep(1)
284
316
  return True
285
317
 
286
318
  async def _disconnect(self) -> bool:
287
- if self.deviceState != DeviceStateEx.Connected and self.deviceState != DeviceStateEx.Ready:
319
+ if (
320
+ self.deviceState != DeviceStateEx.Connected
321
+ and self.deviceState != DeviceStateEx.Ready
322
+ ):
288
323
  return True
289
324
  if self._data_ctx == None:
290
325
  return False
@@ -292,6 +327,7 @@ class SensorProfile:
292
327
  await self._gforce.disconnect()
293
328
  await asyncio.wait_for(self._waitForDisconnect(), 5)
294
329
  return True
330
+
295
331
  def disconnect(self) -> bool:
296
332
  """
297
333
  断开传感器连接。
@@ -302,29 +338,33 @@ class SensorProfile:
302
338
  return sync_timer(self._gforce_event_loop, 0, self._disconnect())
303
339
 
304
340
  async def _process_data(self):
305
- while(self._data_ctx._is_running and self._data_ctx.isDataTransfering):
341
+ while self._data_ctx._is_running and self._data_ctx.isDataTransfering:
306
342
  self._data_ctx.process_data(self._data_buffer)
307
- while(self._data_ctx._is_running and self._data_ctx.isDataTransfering):
343
+ while self._data_ctx._is_running and self._data_ctx.isDataTransfering:
308
344
  sensorData: SensorData = None
309
345
  try:
310
346
  sensorData = self._data_buffer.get_nowait()
311
347
  except Exception as e:
312
348
  break
313
- if (sensorData != None and self._on_data_callback != None):
349
+ if sensorData != None and self._on_data_callback != None:
314
350
  try:
315
- self._event_loop.call_soon_threadsafe(self._on_data_callback,self, sensorData)
351
+ self._event_loop.call_soon_threadsafe(
352
+ self._on_data_callback, self, sensorData
353
+ )
316
354
  except Exception as e:
317
355
  print(e)
318
356
  self._data_buffer.task_done()
319
357
 
320
358
  async def _process_universal_data(self):
321
- self._data_ctx.processUniversalData(self._data_buffer, self._event_loop, self, self._on_data_callback)
359
+ self._data_ctx.processUniversalData(
360
+ self._data_buffer, self._event_loop, self, self._on_data_callback
361
+ )
322
362
 
323
363
  async def _startDataNotification(self) -> bool:
324
364
  result = await self._data_ctx.start_streaming()
325
365
  self._data_buffer.queue.clear()
326
366
  self._data_ctx.clear()
327
- if (not self._data_ctx.isUniversalStream):
367
+ if not self._data_ctx.isUniversalStream:
328
368
  timer(self._data_event_loop, 0, self._process_data())
329
369
  return result
330
370
 
@@ -341,13 +381,15 @@ class SensorProfile:
341
381
  return False
342
382
  if not self._data_ctx.hasInit():
343
383
  return False
344
-
384
+
345
385
  if self._data_ctx.isDataTransfering:
346
386
  return True
347
-
348
- if (self._data_event_loop == None):
349
- self._data_event_loop = asyncio.new_event_loop()
350
- self._data_event_thread = threading.Thread(target=start_loop, args=(self._data_event_loop,))
387
+
388
+ if self._data_event_loop == None:
389
+ self._data_event_loop = asyncio.new_event_loop()
390
+ self._data_event_thread = threading.Thread(
391
+ target=start_loop, args=(self._data_event_loop,)
392
+ )
351
393
  self._data_event_thread.daemon = True
352
394
  self._data_event_thread.name = self.BLEDevice.Name + " data"
353
395
  self._data_event_thread.start()
@@ -371,10 +413,10 @@ class SensorProfile:
371
413
  return False
372
414
  if not self._data_ctx.hasInit():
373
415
  return False
374
-
416
+
375
417
  if not self._data_ctx.isDataTransfering:
376
418
  return True
377
-
419
+
378
420
  return sync_timer(self._gforce_event_loop, 0, self._stopDataNotification())
379
421
 
380
422
  async def _refresh_power(self):
@@ -382,12 +424,18 @@ class SensorProfile:
382
424
 
383
425
  if self._on_power_changed != None:
384
426
  try:
385
- self._event_loop.call_soon_threadsafe(self._on_power_changed, self, self._power)
427
+ self._event_loop.call_soon_threadsafe(
428
+ self._on_power_changed, self, self._power
429
+ )
386
430
  except Exception as e:
387
431
  print(e)
388
-
432
+
389
433
  if self.deviceState == DeviceStateEx.Ready:
390
- timer(self._gforce_event_loop, self._power_interval / 1000, self._refresh_power())
434
+ timer(
435
+ self._gforce_event_loop,
436
+ self._power_interval / 1000,
437
+ self._refresh_power(),
438
+ )
391
439
 
392
440
  async def _init(self, packageSampleCount: int, powerRefreshInterval: int) -> bool:
393
441
  if self.deviceState != DeviceStateEx.Ready:
@@ -396,12 +444,17 @@ class SensorProfile:
396
444
  return False
397
445
  if self._data_ctx.hasInit():
398
446
  return True
399
-
400
- if (await self._data_ctx.init(packageSampleCount)):
447
+
448
+ if await self._data_ctx.init(packageSampleCount):
401
449
  self._power_interval = powerRefreshInterval
402
- timer(self._gforce_event_loop, self._power_interval / 1000, self._refresh_power())
450
+ timer(
451
+ self._gforce_event_loop,
452
+ self._power_interval / 1000,
453
+ self._refresh_power(),
454
+ )
403
455
 
404
456
  return self._data_ctx.hasInit()
457
+
405
458
  def init(self, packageSampleCount: int, powerRefreshInterval: int) -> bool:
406
459
  """
407
460
  初始化数据采集。
@@ -412,7 +465,11 @@ class SensorProfile:
412
465
  :return: bool: 初始化结果。True 表示成功,False 表示失败。
413
466
 
414
467
  """
415
- return sync_timer(self._gforce_event_loop, 0, self._init(packageSampleCount, powerRefreshInterval))
468
+ return sync_timer(
469
+ self._gforce_event_loop,
470
+ 0,
471
+ self._init(packageSampleCount, powerRefreshInterval),
472
+ )
416
473
 
417
474
  def getBatteryLevel(self) -> int:
418
475
  """
@@ -423,7 +480,6 @@ class SensorProfile:
423
480
  """
424
481
  return self._power
425
482
 
426
-
427
483
  def getDeviceInfo(self) -> Optional[DeviceInfo]:
428
484
  """
429
485
  获取传感器的设备信息。
@@ -431,11 +487,10 @@ class SensorProfile:
431
487
  :return: DeviceInfo: 传感器的设备信息。
432
488
 
433
489
  """
434
- if (self.hasInited):
490
+ if self.hasInited:
435
491
  return self._data_ctx._device_info
436
492
  return None
437
493
 
438
-
439
494
  def setParam(self, key: str, value: str) -> str:
440
495
  """
441
496
  设置传感器的参数。
sensor/utils.py CHANGED
@@ -1,20 +1,22 @@
1
1
  import asyncio
2
2
  import signal
3
3
 
4
- async def delay(time:float, function)->any:
5
- if (time > 0):
4
+
5
+ async def delay(time: float, function) -> any:
6
+ if time > 0:
6
7
  await asyncio.sleep(time)
7
8
  return await function
8
9
 
10
+
9
11
  def timer(_loop: asyncio.AbstractEventLoop, time: float, function):
10
12
  try:
11
13
  asyncio.run_coroutine_threadsafe(delay(time, function), _loop)
12
14
  except Exception as e:
13
15
  print(e)
14
16
  pass
15
-
16
17
 
17
- def sync_timer(_loop: asyncio.AbstractEventLoop, time: float, function)->any:
18
+
19
+ def sync_timer(_loop: asyncio.AbstractEventLoop, time: float, function) -> any:
18
20
  try:
19
21
  f = asyncio.run_coroutine_threadsafe(delay(time, function), _loop)
20
22
  return f.result()
@@ -22,7 +24,7 @@ def sync_timer(_loop: asyncio.AbstractEventLoop, time: float, function)->any:
22
24
  print(e)
23
25
  pass
24
26
 
27
+
25
28
  def start_loop(loop: asyncio.BaseEventLoop):
26
29
  asyncio.set_event_loop(loop)
27
30
  loop.run_forever()
28
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sensor-sdk
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Python sdk for Synchroni
5
5
  Home-page: https://github.com/oymotion/SynchroniSDKPython
6
6
  Author: Martin Ye
@@ -0,0 +1,14 @@
1
+ sensor/__init__.py,sha256=L1VyAP0EDEnJIMeMTzp4iXHSRUUHyHScF_GIl3iYKRI,123
2
+ sensor/gforce.py,sha256=ZVOHV6_NiwGMPAf4BXqlxEHsDrynUBr0rcgqmbJT5oc,24586
3
+ sensor/sensor_controller.py,sha256=UcFsbkXbJsknkVARADB_wT0ZGIDVjHfBFMsmxglF1_0,8334
4
+ sensor/sensor_data.py,sha256=Hu7Ql0LgQ7V24xYZhaLrKPwU4KWZeWE655v8Gy8xphY,3934
5
+ sensor/sensor_data_context.py,sha256=fcGEYWOu5x9UGZ-psvKVKA-nxAKfA8vqMEeA4LjsxAA,27978
6
+ sensor/sensor_device.py,sha256=LCjBzm2TuOh2KpHsFTjm1sF8hzwvS22LhF_ueAct0Jo,2848
7
+ sensor/sensor_profile.py,sha256=NuWYSVGrHWA8y2Goi9UyNyZ3bXE8unKrQ560q8looNw,17873
8
+ sensor/utils.py,sha256=LPLnLTOrrsLnVkL65L10PLtqpjgMYkomyVenRc7pUUo,744
9
+ sensor_sdk-0.0.4.dist-info/LICENSE.txt,sha256=8CSivOpub3IuXODTyqBRI91AxouJZk02YrcKuOAkWu8,1111
10
+ sensor_sdk-0.0.4.dist-info/METADATA,sha256=EYBnMeflySNLB1qxF0OtqRx-xW-FiUo_CFAB89w4el8,8055
11
+ sensor_sdk-0.0.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
+ sensor_sdk-0.0.4.dist-info/top_level.txt,sha256=Ftq49B6bH0Ffdc7c8LkcyakHo6lsg_snlBbpEUoILSk,7
13
+ sensor_sdk-0.0.4.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
14
+ sensor_sdk-0.0.4.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- sensor/__init__.py,sha256=L1VyAP0EDEnJIMeMTzp4iXHSRUUHyHScF_GIl3iYKRI,123
2
- sensor/gforce.py,sha256=ZVOHV6_NiwGMPAf4BXqlxEHsDrynUBr0rcgqmbJT5oc,24586
3
- sensor/sensor_controller.py,sha256=SD4kcU9Z0IjAoCDCtpM475TpuNwymGxmuFATP4NjY9M,8078
4
- sensor/sensor_data.py,sha256=pHHHitKPs24MWYorW0DrIe4DKOMZU9c5Oh2mGktDUGg,4449
5
- sensor/sensor_data_context.py,sha256=yFeCydxg2gpAu9Znp_OQup2XPO1iwmJMDTxVvyNEcVY,24140
6
- sensor/sensor_device.py,sha256=XLpYe7jlc60PmIstdcqWJ_Vr1CxR2GPVAx5ll_ofnPM,3052
7
- sensor/sensor_profile.py,sha256=44dCvb6EDv1fT6LJfjWmKlH_BMMVfdt46PlNO_LZaJs,17096
8
- sensor/utils.py,sha256=rrgMKIPJ3u1iVSbQqcfUhlQ5h_IatHNPtqojdUHIc9Y,741
9
- sensor_sdk-0.0.3.dist-info/LICENSE.txt,sha256=8CSivOpub3IuXODTyqBRI91AxouJZk02YrcKuOAkWu8,1111
10
- sensor_sdk-0.0.3.dist-info/METADATA,sha256=qgnH7Pvzl3BstfDE1zHtBL1qH48t0AaDo9fmR5O44Bs,8055
11
- sensor_sdk-0.0.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
- sensor_sdk-0.0.3.dist-info/top_level.txt,sha256=Ftq49B6bH0Ffdc7c8LkcyakHo6lsg_snlBbpEUoILSk,7
13
- sensor_sdk-0.0.3.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
14
- sensor_sdk-0.0.3.dist-info/RECORD,,