-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAST Retro Platform: System11 Support #1769
Merged
Merged
Conversation
This file contains 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
This reverts commit 11f7f3e.
…s-machine-vars-persist Fix tests from missionpinball#1708 machine variable persistence
This reverts commit c339206.
# Conflicts: # mpf/devices/ball_device/outgoing_balls_handler.py # mpf/devices/multiball_lock.py # mpf/modes/bonus/code/bonus.py # mpf/platforms/fast/fast.py # mpf/platforms/fast/fast_driver.py
Quality Gate passedIssues Measures |
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.
This PR migrates the System11 Retro Platform code to MPF 0.57 and the new FAST interface protocols. It also includes a number of stability improvements, bug fixes, and logging quality of life updates.
System11 Retro
Special Driver Type
The bulk of this PR is to support the System11 A/C Relay driver, which is now supported in the FAST Retro firmware with the special driver mode
25
. It adds numerous special commands to configure, enable, and disable the A/C relay.Virtual Relay Switch
Support is also added for a "virtual switch" to represent the open/closed state of the relay. For machines that don't include a physical switch, the FAST Retro platform will emulate a switch which can then be used by MPF to confirm when the relay has completed its state change. The fallback behavior of a timeout still exists.
Queue bypassing and side prioritization
This PR refactors the implementation of a "preferred" side of the relay, to allow high-priority drivers (e.g. coils) to take precedence over drivers on the preferred side (e.g. flashers). Typically the System11 interface will wait for the preferred side queue to be clear before switching, but flasher shows can clog up the queue and prevent the coils from ever being fired. With this PR, additional calls to the preferred queue can be ignored when the other side is requested, ensuring that coil actions happen immediately.
Other Improvements
Bugfix autodetect logic
This PR improves the logic for looping over serial devices during port auto detection. There were gaps in the previous logic that could lead to infinite loops or uncancelled tasks, both of which would prevent game startup if a FAST connection (even an optional one) was not found.
Assert required responses from FAST NET
This PR adds an
assert
statement (in dev mode only) to ensure that any FAST NET command that holds the queue for a response has a required response of at least 3 characters. The logic to validate responses is based on the message header, which is three characters, so any blocker for less than 3 characters will never fulfill and all communications with the NET will stop. The assert statement will help to prevent these situations.Log serial writer exceptions
This PR adds an error log when an exception is caught by the serial writer, before that exception is swallowed. It's okay to swallow exceptions, but without a log there is no way to know an issue exists and could silently break communication with the NET platform. The new error log will help developers troubleshoot NET communication issues without pulling out their hair (ask me how I know!).