diff options
| author | dherrada <dylan.herrada@adafruit.com> | 2020-07-03 10:17:35 -0400 |
|---|---|---|
| committer | dherrada <dylan.herrada@adafruit.com> | 2020-07-03 10:17:35 -0400 |
| commit | ff8604bb825dd003625c8e139d66fc90d93a8340 (patch) | |
| tree | 1bd5f24932bebc399c3738b7a72b31c472337ec5 | |
| parent | 51841447be983480357bfadd9a41d0c5efc33917 (diff) | |
Added type hints to gamepad
| -rw-r--r-- | shared-bindings/gamepad/GamePad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/gamepad/GamePad.c b/shared-bindings/gamepad/GamePad.c index 5e035762e..a5da83e3e 100644 --- a/shared-bindings/gamepad/GamePad.c +++ b/shared-bindings/gamepad/GamePad.c @@ -70,7 +70,7 @@ //| time.sleep(0.1)""" //| -//| def __init__(self, b1: Any, b2: Any, b3: Any, b4: Any, b5: Any, b6: Any, b7: Any, b8: Any): +//| def __init__(self, b1: DigialInOut, b2: DigialInOut, b3: DigialInOut, b4: DigialInOut, b5: DigialInOut, b6: DigialInOut, b7: DigialInOut, b8: DigialInOut): //| """Initializes button scanning routines. //| //| The ``b1``-``b8`` parameters are ``DigitalInOut`` objects, which @@ -114,7 +114,7 @@ STATIC mp_obj_t gamepad_make_new(const mp_obj_type_t *type, size_t n_args, return MP_OBJ_FROM_PTR(gamepad_singleton); } -//| def get_pressed(self) -> Any: +//| def get_pressed(self) -> int: //| """Get the status of buttons pressed since the last call and clear it. //| //| Returns an 8-bit number, with bits that correspond to buttons, @@ -133,7 +133,7 @@ STATIC mp_obj_t gamepad_get_pressed(mp_obj_t self_in) { MP_DEFINE_CONST_FUN_OBJ_1(gamepad_get_pressed_obj, gamepad_get_pressed); -//| def deinit(self) -> Any: +//| def deinit(self) -> None: //| """Disable button scanning.""" //| ... //| |
