Draft
Conversation
- It reads the controller and puts the named button or
axis value into memory as "/event/button/{name}" or
"/event/axis/name".
- The controller can be given a dictionary to map low level
button and axis names to some more generic name. If
no map is provided then the low level names are used.
- The event is deleted after one pass through the event loop.
- This is part of controller rewrite. it is the base system
for reading raw joystick values and getting them
into vehicle memory.
- remove() takes a list of keys to delete from memory. - add type to Vehicle constructor
- Buttons now output press/release/click one-shot events. The click event includes the count of sequential fast-clicks that can be used to support double-click, triple-click, etc. - The value of a button event is the time at which the event occured. - The value of an axis event is the value of the axis. - The state of a control is now written to memory a persistent value so that parts can use them as inputs. This allows a part to use one control's value as a modifier to another control's event. It also allows a part to use an control's state without having to listen for events and maintain the control's state itself.
Contributor
Author
|
This seems like a bug in the memory.py: Line 22 in f81750d value = tuple(key) and not value = tuple(value)?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A proof of concept for an approach to addressing issue #1097. This PR is not intended to be merged; it is here so that the changes to the code can be easily seen and commented upon.
Comments on the general approach to refactoring the game controller code should be addressed to the issue. Use this PR to make comments specific to the code.