smartpi 0.1.39__py3-none-any.whl → 0.1.40__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.
smartpi/__init__.py CHANGED
@@ -4,5 +4,5 @@ from .base_driver import P1, P2, P3, P4, P5, P6, M1, M2, M3, M4, M5, M6
4
4
  __all__ = ["base_driver","gui","ultrasonic","touch_sensor","temperature","humidity","light_sensor","color_sensor","motor","servo","led","flash",
5
5
  "P1", "P2", "P3", "P4", "P5", "P6", "M1", "M2", "M3", "M4", "M5", "M6"]
6
6
 
7
- __version__ = "0.1.39"
7
+ __version__ = "0.1.40"
8
8
 
smartpi/base_driver.py CHANGED
@@ -543,13 +543,15 @@ def buf_clear():
543
543
  while ser.in_waiting > 0:
544
544
  ser.read(ser.in_waiting)
545
545
  # 然后重置输入缓冲区
546
- ser.reset_input_buffer()
547
- fcntl.ioctl(ser.fileno(), termios.TCIOFLUSH)
546
+ ser.reset_input_buffer()
548
547
  except Exception as e:
549
548
  print(f"清空串口缓冲区时出错: {e}")
549
+
550
+ try:
551
+ fcntl.ioctl(ser.fileno(), termios.TCIOFLUSH)
552
+ except:
553
+ pass
550
554
 
551
- return True
552
-
553
555
  """H2-RCU初始化"""
554
556
  def smartpi_init():
555
557
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smartpi
3
- Version: 0.1.39
3
+ Version: 0.1.40
4
4
  Summary: A library use for H2-RCU
5
5
  Author: ZMROBO
6
6
  Classifier: Programming Language :: Python :: 3
@@ -15,3 +15,9 @@ SmartPi library
15
15
  V0.1.31
16
16
  1、更新了设备硬件ID读取函数;
17
17
 
18
+ V0.1.40
19
+ 1、优化所有读取和控制从机的通讯函数;
20
+ 2、优化通讯机制,全层面接收缓存及时清空;
21
+ 3、增加电源按键检测机制;
22
+ 4、增加可调用模型和相关功能函数;
23
+
@@ -1,6 +1,6 @@
1
- smartpi/__init__.py,sha256=LgSBlByXGxmiXhChGNwjiCBUlA15KEEF6zyjjQSnKRU,356
1
+ smartpi/__init__.py,sha256=lgvWM6XngdHhfhur-HqA9I6w80369Bds413J-z9-M00,356
2
2
  smartpi/_gui.py,sha256=ij-6HZAEIwdy_hvU7f0NkyQjx_-eephijlKbGUhf8Uo,2177
3
- smartpi/base_driver.py,sha256=ErjnmKXexJNq7o_V7gLqbPmitbLBJykj2-jY0psu3AM,22673
3
+ smartpi/base_driver.py,sha256=3auYdDiVA_VUQTmf9P7Q3pKbQYoqSCGnlGVNm6fIJZA,22709
4
4
  smartpi/camera.py,sha256=AVpZsMpW-24CP3BOfarjmRawMJdTOZY7Crq7FeLOqb4,3292
5
5
  smartpi/color_sensor.py,sha256=ckIXD81YnqPo6nENAnipNp3gY12FJ235QKj0e8Cul9E,521
6
6
  smartpi/cw2015.py,sha256=1lAF-pi_ye_ya1AZQS1sjbgsDf7MThO5IAskKsNGBzA,5695
@@ -38,7 +38,7 @@ smartpi/text_gte_model/config/tokenizer_config.json,sha256=w5RiDifbeIYy6vyGX5v94
38
38
  smartpi/text_gte_model/config/vocab.txt,sha256=oi9hP3uz_8h8XoHNh6rgLnVdJbIEm75zKoSKM8HzsC8,84758
39
39
  smartpi/text_gte_model/gte/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  smartpi/text_gte_model/gte/gte_model.onnx,sha256=XXYg6TUhzOx1SqAhp6ePDU0QgeK6DQEqHATMuQQJCNE,30468366
41
- smartpi-0.1.39.dist-info/METADATA,sha256=qKSCrEvV5APB123Lk272-FhatFQTZL1lSQxJSDYFGzY,399
42
- smartpi-0.1.39.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
43
- smartpi-0.1.39.dist-info/top_level.txt,sha256=PoLhUCmWAiQUg5UeN2fS-Y1iQyBbF2rdUlizXtpHGRQ,8
44
- smartpi-0.1.39.dist-info/RECORD,,
41
+ smartpi-0.1.40.dist-info/METADATA,sha256=aIRCVI2rKjrkyntUYSJek9NYPebmnwHuNwa2FhYubFw,614
42
+ smartpi-0.1.40.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
43
+ smartpi-0.1.40.dist-info/top_level.txt,sha256=PoLhUCmWAiQUg5UeN2fS-Y1iQyBbF2rdUlizXtpHGRQ,8
44
+ smartpi-0.1.40.dist-info/RECORD,,