self.machine.hardware_platforms['snux']¶
-
class
mpf.platforms.snux.
HardwarePlatform
(machine)¶ Bases:
mpf.core.platform.DriverPlatform
Overlay platform for the snux hardware board.
Accessing the snux platform via code
Hardware platforms are stored in the
self.machine.hardware_platforms
dictionary, so the snux platform is available viaself.machine.hardware_platforms['snux']
.Methods & Attributes
The snux platform has the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.
-
a_side_busy
¶ True when A side cannot be switches off right away.
-
c_side_active
¶ True when C side cannot be switches off right away.
-
clear_hw_rule
(switch, coil)¶ Clear a rule for a driver on the snux board.
-
configure_driver
(config)¶ Configure a driver on the snux board.
Parameters: config -- Driver config dict
-
driver_action
(driver, coil, milliseconds)¶ Add a driver action for a switched driver to the queue (for either the A-side or C-side queue).
Parameters: - driver -- A reference to the original platform class Driver instance.
- milliseconds -- Integer of the number of milliseconds this action is for. 0 = pulse, -1 = enable (hold), any other value is a timed action (either pulse or long_pulse)
This action will be serviced immediately if it can, or ASAP otherwise.
-
initialize
()¶ Automatically called by the Platform class after all the core modules are loaded.
-
set_pulse_on_hit_and_enable_and_release_and_disable_rule
(enable_switch, disable_switch, coil)¶ Configure a rule for a driver on the snux board.
Will pass the call onto the parent platform if the driver is not on A/C relay.
-
set_pulse_on_hit_and_enable_and_release_rule
(enable_switch, coil)¶ Configure a rule for a driver on the snux board.
Will pass the call onto the parent platform if the driver is not on A/C relay.
-
set_pulse_on_hit_and_release_rule
(enable_switch, coil)¶ Configure a rule for a driver on the snux board.
Will pass the call onto the parent platform if the driver is not on A/C relay.
-
set_pulse_on_hit_rule
(enable_switch, coil)¶ Configure a rule on the snux board.
Will pass the call onto the parent platform if the driver is not on A/C relay.
-
stop
()¶ Stop the overlay. Nothing to do here because stop is also called on parent platform.
-
tick
(dt)¶ Snux main loop.
Called based on the timer_tick event
Parameters: dt -- time since last call
-
validate_coil_section
(driver, config)¶ Validate coil config for platform.
-