self.machine.hardware_platforms[‘snux’]

class mpf.platforms.snux.SnuxHardwarePlatform(machine: mpf.core.machine.MachineController)

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 via self.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

Return if A side cannot be switches off right away.

c_side_active

Return if 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: mpf.core.platform.DriverConfig, number: str, platform_settings: dict)

Configure a driver on the snux board.

Parameters:config – Driver config dict
driver_action(driver, pulse_settings: Optional[mpf.platforms.interfaces.driver_platform_interface.PulseSettings], hold_settings: Optional[mpf.platforms.interfaces.driver_platform_interface.HoldSettings])

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.
  • pulse_settings – Settings for the pulse or None
  • hold_settings – Settings for hold or None

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()

Snux main loop.

Called based on the timer_tick event

validate_coil_section(driver, config)

Validate coil config for platform.