Skip to content

Commit

Permalink
Merge pull request #1760 from avanwinkle/misc-fixes
Browse files Browse the repository at this point in the history
Misc fixes: no match, timed_enable_events, FAST Nano RGB
  • Loading branch information
avanwinkle authored Feb 22, 2024
2 parents 74449ec + 696ede1 commit d93655c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions mpf/config_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ coils:
disable_events: event_handler|event_handler:ms|None
enable_events: event_handler|event_handler:ms|None
pulse_events: event_handler|event_handler:ms|None
timed_enable_events: event_handler|event_handler:ms|None
platform_settings: single|dict|None
psu: single|machine(psus)|default
platform: single|str|None
Expand Down Expand Up @@ -1794,6 +1795,7 @@ sound_player:
delay: single|secs|None
track: single|str|None
volume: single|gain|None
ducking: single|subconfig(sound_ducking)|None
pan: single|float_or_token|None
loops: single|int_or_token|None
priority: single|int_or_token|None
Expand Down
4 changes: 4 additions & 0 deletions mpf/modes/bonus/code/bonus.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def _bonus_next_item(self):
self._subtotal()
return

# Calling player.vars.get() instead of player.get() bypasses the
# auto-fill zero and will throw if there is no player variable.
# The fallback value of 1 is used for bonus entries that don't use
# a player score, which are multiplied by one to get the bonus.
hits = self.player.vars.get(entry['player_score_entry'], 1)
score = entry['score'].evaluate([]) * hits

Expand Down
4 changes: 2 additions & 2 deletions mpf/modes/match/code/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def __init__(self, *args, **kwargs):
"""initialize match mode."""
super().__init__(*args, **kwargs)
# add setting
self.machine.settings.add_setting(SettingEntry("match_percentage", "Match percentage", 500,
self.machine.settings.add_setting(SettingEntry("match_percentage", "Match Percentage", 500,
"match_percentage", 10,
{0: "off", 2: "2%", 5: "5%", 10: "10%", 15: "15%", 30: "30%",
{0: "Never", 2: "2%", 5: "5%", 10: "10%", 15: "15%", 30: "30%",
50: "50%"}, "standard"))

def _get_match_numbers(self):
Expand Down
3 changes: 2 additions & 1 deletion mpf/platforms/fast/communicators/rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def start_tasks(self):
async def soft_reset(self, **kwargs):
"""Reset the NET processor."""
del kwargs
await self.send_and_wait_for_response('RA:000000', 'RX:P')
#await self.send_and_wait_for_response('RA:000000', 'RX:P')
self.send_and_forget("RA:000000")

def reset(self):
"""Reset the RGB processor."""
Expand Down

0 comments on commit d93655c

Please sign in to comment.