SimpleJoyCon 1.0.2__tar.gz → 1.0.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimpleJoyCon
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Una libreria de bajo nivel simplificada, estetica y sin comillas para usar Joy-Cons en Python
5
5
  Author: EVOLVE
6
6
  Classifier: Programming Language :: Python :: 3
@@ -0,0 +1,2 @@
1
+ from .joycon_l import JoyconL as L
2
+ from .joycon_r import JoyconR as R
@@ -1,7 +1,6 @@
1
1
  import hid
2
2
  import time
3
3
  from .componentes import ContenedorBotonesL, Palanca, Bateria, SensorMovimiento, Boton
4
-
5
4
  class JoyconL:
6
5
  def __init__(self):
7
6
  self.packet_counter = 0
@@ -27,11 +26,12 @@ class JoyconL:
27
26
  except Exception:
28
27
  print(" -> Control Izquierdo no detectado. Reintentando... (Presiona un botón en el Joy-Con)", end="\r")
29
28
  time.sleep(1.0)
30
-
31
- print("\n[OK] ¡Joy-Con L Conectado!")
32
- self._enviar_subcomando(0x48, [0x01])
33
- self._enviar_subcomando(0x40, [0x01])
34
-
29
+ try:
30
+ print("\n[OK] ¡Joy-Con L Conectado!")
31
+ self._enviar_subcomando(0x48, [0x01])
32
+ self._enviar_subcomando(0x40, [0x01])
33
+ except Exception as e:
34
+ print(f"[SimpleJoycon Joy-Con L] Error: {e}")
35
35
  def _next_id(self):
36
36
  c = self.packet_counter & 0x0F
37
37
  self.packet_counter += 1
@@ -1,7 +1,6 @@
1
1
  import hid
2
2
  import time
3
3
  from .componentes import ContenedorBotonesR, Palanca, Bateria, SensorMovimiento, Boton
4
-
5
4
  class JoyconR:
6
5
  def __init__(self):
7
6
  self.packet_counter = 0
@@ -30,11 +29,12 @@ class JoyconR:
30
29
  time.sleep(1.0)
31
30
 
32
31
  # Inicialización de hardware una vez conectado
33
- print("\n[OK] ¡Joy-Con R conectado!")
34
- self._enviar_subcomando(0x48, [0x01])
35
- self._enviar_subcomando(0x40, [0x01])
32
+ try:
33
+ print("\n[OK] ¡Joy-Con R conectado!")
34
+ self._enviar_subcomando(0x48, [0x01])
35
+ self._enviar_subcomando(0x40, [0x01])
36
36
  except Exception as e:
37
- print('[SimpleJoycon ERROR R]:', e)
37
+ print(f"[SimpleJoycon Joycon R] ERROR: {e}")
38
38
  raise
39
39
 
40
40
  def _next_id(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SimpleJoyCon
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Una libreria de bajo nivel simplificada, estetica y sin comillas para usar Joy-Cons en Python
5
5
  Author: EVOLVE
6
6
  Classifier: Programming Language :: Python :: 3
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setup(
8
8
  name="SimpleJoyCon",
9
- version="1.0.2",
9
+ version="1.0.3",
10
10
  description="Una libreria de bajo nivel simplificada, estetica y sin comillas para usar Joy-Cons en Python",
11
11
  long_description=long_description, # <--- LE DICE A PYPI QUE USE EL README
12
12
  long_description_content_type="text/markdown", # <--- CORRIGE EL FORMATO A MARKDOWN
@@ -1,2 +0,0 @@
1
- from .joycon_r import JoyconR as R
2
- from .joycon_l import JoyconL as L
File without changes
File without changes