robot-xbox-controller 0.2.0__tar.gz → 0.2.1__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: robot-xbox-controller
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Library for xbox controllers.
5
5
  Project-URL: Documentation, https://github.com/fmorton/robot-python-xbox-controller#readme
6
6
  Project-URL: Issues, https://github.com/fmorton/robot-python-xbox-controller/issues
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
 
6
6
  [project]
7
7
  name = "robot-xbox-controller"
8
- version = "0.2.0"
8
+ version = "0.2.1"
9
9
  description = "Library for xbox controllers."
10
10
  readme = "README.rst"
11
11
  requires-python = ">=3.9"
@@ -17,7 +17,7 @@ class XboxController:
17
17
  BUTTON_Y = 3
18
18
  BUTTON_VIEW = 4 # left middle button
19
19
  BUTTON_XBOX = 5 # center middle button
20
- BUTTON_MENU = 6 # right middle button
20
+ BUTTON_MENU = 6 # right middle button
21
21
  BUTTON_LEFT_JOYSTICK = 7
22
22
  BUTTON_RIGHT_JOYSTICK = 8
23
23
  BUTTON_LEFT_BUMPER = 9
@@ -53,7 +53,7 @@ class XboxState:
53
53
  if debugging:
54
54
  print(self.state_string())
55
55
 
56
- def dictionary(self):
56
+ def dictionary(self, debugging=False):
57
57
  d = {}
58
58
  d["left_x"] = self.left_x()
59
59
  d["left_y"] = self.left_y()
@@ -81,6 +81,9 @@ class XboxState:
81
81
  d["d_pad_left"] = self.button_down_milliseconds(13)
82
82
  d["d_pad_right"] = self.button_down_milliseconds(14)
83
83
 
84
+ if debugging:
85
+ print(d)
86
+
84
87
  return d
85
88
 
86
89
  def left_x(self):