Skip to content

Commit de68b7d

Browse files
authored
Merge pull request #66 from dhalbert/remove-gamepad
move gamepad.py to examples
2 parents e9a81ba + 93e136e commit de68b7d

File tree

5 files changed

+4
-26
lines changed

5 files changed

+4
-26
lines changed

README.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ The ``Mouse`` class simulates a three-button mouse with a scroll wheel.
124124
The ``ConsumerControl`` class emulates consumer control devices such as
125125
remote controls, or the multimedia keys on certain keyboards.
126126

127-
*New in CircuitPython 3.0.*
128-
129127
.. code-block:: python
130128
131129
import usb_hid
@@ -140,23 +138,6 @@ remote controls, or the multimedia keys on certain keyboards.
140138
# Pause or resume playback.
141139
cc.send(ConsumerControlCode.PLAY_PAUSE)
142140
143-
The ``Gamepad`` class emulates a two-joystick gamepad with 16 buttons.
144-
145-
*New in CircuitPython 3.0.*
146-
147-
.. code-block:: python
148-
149-
import usb_hid
150-
from adafruit_hid.gamepad import Gamepad
151-
152-
gp = Gamepad(usb_hid.devices)
153-
154-
# Click gamepad buttons.
155-
gp.click_buttons(1, 7)
156-
157-
# Move joysticks.
158-
gp.move_joysticks(x=2, y=0, z=-20)
159-
160141
Contributing
161142
============
162143

docs/api.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@
1818

1919
.. automodule:: adafruit_hid.consumer_control_code
2020
:members:
21-
22-
.. automodule:: adafruit_hid.gamepad
23-
:members:

adafruit_hid/gamepad.py renamed to examples/gamepad.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44

55
"""
6-
`adafruit_hid.gamepad.Gamepad`
6+
`Gamepad`
77
====================================================
88
99
* Author(s): Dan Halbert
@@ -12,7 +12,7 @@
1212
import struct
1313
import time
1414

15-
from . import find_device
15+
from adafruit_hid import find_device
1616

1717

1818
class Gamepad:

examples/hid_joywing_gamepad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from micropython import const
1111
import adafruit_seesaw
1212
import usb_hid
13-
from adafruit_hid.gamepad import Gamepad
13+
from gamepad import Gamepad
1414

1515

1616
def range_map(value, in_min, in_max, out_min, out_max):

examples/hid_simple_gamepad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import analogio
77
import usb_hid
88

9-
from adafruit_hid.gamepad import Gamepad
9+
from gamepad import Gamepad
1010

1111
gp = Gamepad(usb_hid.devices)
1212

0 commit comments

Comments
 (0)