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

Enable Speedometer Devices #1692

Merged
merged 5 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mpf/config_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,11 @@ sound_ducking:
sound_marker:
time: single|secs|
events: list|event_posted|
speedometers:
__valid_in__: machine, mode
__type__: device
start_switch: single|machine(switches)|None
stop_switch: single|machine(switches)|None
spi_bit_bang:
__valid_in__: machine
__type__: config
Expand Down
1 change: 1 addition & 0 deletions mpf/devices/speedometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ def _handle_stop_switch(self, **kwargs):
delta = self.config['stop_switch'].last_change - self.time_start
self.time_start = None
print(delta)
self.machine.events.post("{}_hit".format(self.name), delta = delta)
# TODO: post event
1 change: 1 addition & 0 deletions mpf/mpfconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ mpf:
timers: mpf.devices.timer.Timer
segment_displays: mpf.devices.segment_display.segment_display.SegmentDisplay
sequence_shots: mpf.devices.sequence_shot.SequenceShot
speedometers: mpf.devices.speedometer.Speedometer
hardware_sound_systems: mpf.devices.hardware_sound_system.HardwareSoundSystem
steppers: mpf.devices.stepper.Stepper
state_machines: mpf.devices.state_machine.StateMachine
Expand Down