smartpi 0.1.43__py3-none-any.whl → 0.1.45__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.43"
7
+ __version__ = "0.1.45"
8
8
 
smartpi/_gui.py CHANGED
@@ -12,6 +12,7 @@ class gui_client:
12
12
  self.clear()
13
13
  except :
14
14
  self.sock = None
15
+ print(self.is_connected())
15
16
 
16
17
  def is_connected(self):
17
18
  result = False
@@ -24,12 +25,12 @@ class gui_client:
24
25
  return
25
26
  try:
26
27
  self.sock.sendall((json.dumps(cmd) + "\n").encode())
27
- time.sleep(0.1)
28
+ time.sleep(0.1) # 确保命令发送出去
28
29
  except :
29
30
  self.sock = None
30
31
 
31
- def show_text(self, x, y, text, color="black", size=16):
32
- self._send({"type": "text", "x": x, "y": y, "text": text, "color": color, "size": size})
32
+ def show_text(self, x, y, text, color="black", size=16, update_bgc=False, bgc_color="white"):
33
+ self._send({"type": "text", "x": x, "y": y, "text": text, "color": color, "size": size, "update_bgc": update_bgc, "bgc_color": bgc_color})
33
34
 
34
35
  def print(self, text):
35
36
  self._send({"type": "print", "text": text})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smartpi
3
- Version: 0.1.43
3
+ Version: 0.1.45
4
4
  Summary: A library use for H2-RCU
5
5
  Author: ZMROBO
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,5 +1,5 @@
1
- smartpi/__init__.py,sha256=YzlPmAHE6lnrGS7ChCmQYrfk9QZRPCNMlw46chQnWSY,356
2
- smartpi/_gui.py,sha256=ij-6HZAEIwdy_hvU7f0NkyQjx_-eephijlKbGUhf8Uo,2177
1
+ smartpi/__init__.py,sha256=1xO3w55dNFBUoV3CdkWGSX4_NTDxDuCvItASc0gUrII,356
2
+ smartpi/_gui.py,sha256=hOxw7wV7P_G2frqOb47FcNQ7cuYr_jOgg_cbYt5nvzU,2326
3
3
  smartpi/ai_asr.py,sha256=wxh_1Klh8vJottAt19jq3qpOmM_Cw4DHQEPKpsHGhmE,40063
4
4
  smartpi/ai_llm.py,sha256=-khBK2PMwbYUDvbaCTRCktE4dFloqfai4mHI-V8GEXM,36751
5
5
  smartpi/ai_tts.py,sha256=OjAJs3XOykiufXuEDiaD0coKsWjknPdhwRpRzGLDZKU,36061
@@ -70,7 +70,7 @@ smartpi/text_gte_model/config/tokenizer_config.json,sha256=w5RiDifbeIYy6vyGX5v94
70
70
  smartpi/text_gte_model/config/vocab.txt,sha256=oi9hP3uz_8h8XoHNh6rgLnVdJbIEm75zKoSKM8HzsC8,84758
71
71
  smartpi/text_gte_model/gte/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
72
  smartpi/text_gte_model/gte/gte_model.onnx,sha256=XXYg6TUhzOx1SqAhp6ePDU0QgeK6DQEqHATMuQQJCNE,30468366
73
- smartpi-0.1.43.dist-info/METADATA,sha256=Itx-zHFW2xLOdYkd5UgHu7EKImJObZdgVXD-yduwt7c,614
74
- smartpi-0.1.43.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
75
- smartpi-0.1.43.dist-info/top_level.txt,sha256=PoLhUCmWAiQUg5UeN2fS-Y1iQyBbF2rdUlizXtpHGRQ,8
76
- smartpi-0.1.43.dist-info/RECORD,,
73
+ smartpi-0.1.45.dist-info/METADATA,sha256=ngkAhmsL1GemQJ6TD2HmtQoWzSOYSz_JnZ9H7mwVg5Q,614
74
+ smartpi-0.1.45.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
75
+ smartpi-0.1.45.dist-info/top_level.txt,sha256=PoLhUCmWAiQUg5UeN2fS-Y1iQyBbF2rdUlizXtpHGRQ,8
76
+ smartpi-0.1.45.dist-info/RECORD,,