Skip to content
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

New 'enabled' property on displays to prevent slide rendering #410

Merged
merged 6 commits into from
Dec 15, 2020

Conversation

avanwinkle
Copy link
Collaborator

@avanwinkle avanwinkle commented Nov 28, 2020

This PR adds a new configuration option enabled to the displays: configs. By default a display is enabled but it can be explicitly disabled via config.

displays:
  display_dmd:
    width: 128
    height: 32
  display_lcd:
    width: 640
    height: 480
    enabled: false

This setting allows a single machine codebase to support multiple display configuration variants without having to duplicate all of the slides or double-up all the names. By passing a mpf -c other_config argument in the command line, an alternate configuration that changes the enabled displays can be used to prevent rendering of unneeded slides.

Use case 1: Extended development slides

In this use case, a secondary display can be created and rendered that shows debugging options, variables and machine state, and other data useful to the developer. This display can be enabled on a development machine and disabled on a production machine, improving the slide render time on the production machine.

Use case 2: Multiple machine variants

In this use case, a game can be developed that offers different machine configurations: one edition with a DMD and another with an LCD, or one edition with an in-playfield screen and another version without.

@avanwinkle
Copy link
Collaborator Author

Build failed because the sound card failed to initialize on the test runners :(

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Nov 29, 2020

Don't think the test failure is sound related. Those errors always happen. Tests still pass.

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Dec 14, 2020

LGTM!

@avanwinkle avanwinkle merged commit ef1c31f into missionpinball:dev Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants