summaryrefslogtreecommitdiff
path: root/shared-bindings/gamepad/GamePad.c
AgeCommit message (Collapse)Author
2020-07-03Made every init return Nonedherrada
2020-07-03Made most of the requested changesdherrada
2020-07-03Added type hints to gamepaddherrada
2020-07-02Removed all 'self, )'dherrada
2020-05-15Merge pull request #2810 from dherrada/masterScott Shawcroft
Pyi integration
2020-05-13Gamepad & GamepadShift: Initially allocate as long-livedJeff Epler
This makes less heap churn and decreases code size a tiny bit
2020-05-13Gamepad & GamepadShift: Enable ticks while object existsJeff Epler
Otherwise, button presses might not be noticed.
2020-05-12Swap sphinx to autoapi and the inline stubsScott Shawcroft
2020-05-07Added gamepad, gamepadshift, and i2cslavedherrada
2019-06-12When clearing gamepad buffer, use the last button state, not 0Radomir Dopieralski
When reading the accumulated button presses in gamepad and gamepadshift, don't clear the buffer to "no buttons pressed", but instead set it to the current (last checked) state. This clears the accumulated presses, but retains any ongoing ones. This fixes #1935
2019-04-17Merge pull request #1808 from pewpew-game/gamepad-docDan Halbert
Update GamePad docs to include pull-downs
2019-04-17Update GamePad docs to include pull-downsRadomir Dopieralski
2019-04-16Include cleanup and style tweaksScott Shawcroft
2019-04-15Split GamePadShift from GamePad to save space on most boards.Scott Shawcroft
2019-04-12Reorganize the gamepad codeRadomir Dopieralski
2019-04-12Sync gampad_singleton with the long lived copyRadomir Dopieralski
2019-04-12More refactoringRadomir Dopieralski
2019-04-12Optimize the size of code for gamepadRadomir Dopieralski
2019-04-12Read one bit per system clock tick in GamePadShiftRadomir Dopieralski
2019-04-12Add GamePadShift for handling shift-register-based buttonsRadomir Dopieralski
2019-01-14Add subclass support to displayio.Scott Shawcroft
Also, swap make_news to accept a kwarg map and refine param checking. Fixes #1237
2018-08-07Support internationalisation.Scott Shawcroft
2018-05-30Add gamepad_singleton to root pointersRadomir Dopieralski
2018-05-30Make the gamepad singleton long-livedRadomir Dopieralski
So that it is not later moved.
2018-05-23Remove volatile from the gamepad structRadomir Dopieralski
2018-05-23Raise an error if more than 8 buttons passed to gamepadRadomir Dopieralski
2018-05-23Avoid uninitialized gamepad on exceptionRadomir Dopieralski
Raise exceptions before the gamepad_singleton is created. Also, use mp_raise for creating the exceptions.
2018-05-23Make gamepad.get_pressed work when gamepad was created from frozen codeRadomir Dopieralski
For some reason, when the GamePad is created from frozen code, the get_pressed method would always return 0. This fixes it, and makes it work properly no matter how the object was created.
2018-05-23Cache pullup state in gamepadRadomir Dopieralski
Don't check the pin's pull direction on every tick, instead cache it at the beginning. Also avoid a "can't get pull of output pin" error when one of the pins passed is in output mode.
2018-03-31Add a type check to the gamepad moduleRadomir Dopieralski
Make sure that all the arguments passed are indeed DigitalInOut. This avoids crashes when the users pass something else.
2018-01-11Fix example for gamepadRadomir Dopieralski
The example code for the gamepad module would skip detected button presses in the code that waits for a button to be released, because it would run it even when no button is pressed. Also updated the example pin names to not use RX and TX.
2017-10-03Add a `gamepad` module for handling buttons in the background. (#295)Radomir Dopieralski
The `GamePad` singleton monitors buttons in the background to make sure a button press is never missed and debouncing happens consistently.