-
Notifications
You must be signed in to change notification settings - Fork 144
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
DigitalScoreReel Device #1545
DigitalScoreReel Device #1545
Conversation
Does this visualize score reels (i.e. a real score reel with virtual coils) or is this independent? I guess the latter right? |
@jabdoa2 It does not virtualize real reels, just creates events for a media controller to drive image-based reels. So maybe "virtual" isn't the best name for it. ImageScoreReel? DigitalScoreReel? |
I like digital_score_reels. Might make it a bit more clear. Nice work! |
Just pushed a change to make the score reel more flexible. Instead of keying the kwargs on the score character ( Also added a new config option |
LGTM. Feel free to merge when you are ready. |
The DigitalScoreReel device attaches to an event that posts a value, and then re-posts an event with the value broken up into the data necessary for a score reel. The configuration looks like this:
In this example, the DigitalScoreReel will listen for player_score events and then parse the
value
keyword arg from the event. For each reel (in this case, four reels), the DigitalScoreReel will post a new event with the corresponding frame that the reel image should move to.In the above example, the thousands character "5" corresponds to the image frame 45, so the event includes
'1k': '45'
, and the hundreds character "2" corresponds to the image frame 18, so the event includes'100': '18'
. All the values are provided as strings, for compatibility with existing patterns (https://github.com/missionpinball/mpf-mc/blob/dev/mpfmc/uix/widget.py#L461)reel_count
config option ensures that the DigitalScoreReel will zero-pad reels larger than the player's score.include_player_number
config option, if true, will append_player(num)
to the posted event.This implementation is designed to be flexible. Reels may include any characters (not just numbers), and may be used for events besides the score (e.g. ball count, jackpot value, et cetera).
This PR also includes the config_spec.yaml updates necessary to support image end_frame, frame_skips, and image_templates and provided in missionpinball/mpf-mc#411