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.
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/PKG-INFO +1 -1
- simplejoycon-1.0.3/SimpleJoyCon/__init__.py +2 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon/joycon_l.py +6 -6
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon/joycon_r.py +5 -5
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon.egg-info/PKG-INFO +1 -1
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/setup.py +1 -1
- simplejoycon-1.0.2/SimpleJoyCon/__init__.py +0 -2
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/README.md +0 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon/componentes.py +0 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon.egg-info/SOURCES.txt +0 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon.egg-info/dependency_links.txt +0 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon.egg-info/requires.txt +0 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/SimpleJoyCon.egg-info/top_level.txt +0 -0
- {simplejoycon-1.0.2 → simplejoycon-1.0.3}/setup.cfg +0 -0
|
@@ -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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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(
|
|
37
|
+
print(f"[SimpleJoycon Joycon R] ERROR: {e}")
|
|
38
38
|
raise
|
|
39
39
|
|
|
40
40
|
def _next_id(self):
|
|
@@ -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.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|