OPP platform doesn't allow changing pulse width using pulse call

22 views
Skip to first unread message

Jeremy Wilson

unread,
Sep 19, 2016, 8:54:10 PM9/19/16
to MPF Users
I'm finally at a state where I can test MPF on my game, and when I hit a drop target I get this and MPF crashes:

INFO : SwitchController : <<<<< switch: pfs_left_eject, State:1 >>>>>
ERROR : root : OPP platform doesn't allow changing pulse width using pulse call. Tried 10, used None
Traceback (most recent call last):
 File "/usr/local/lib/python3.4/dist-packages/mpf/commands/game.py", line 130, in __init__
   MachineController(mpf_path, machine_path, vars(args)).run()
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/machine.py", line 540, in run
   self._run_loop()
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/machine.py", line 563, in _run_loop
   self.process_frame()
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/machine.py", line 581, in process_frame
   self.clock.tick()
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/clock.py", line 735, in tick
   self._process_event_callbacks()
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/clock.py", line 918, in _process_event_callbacks
   ret = callback(self.frametime)
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/switch_controller.py", line 611, in _tick
   self.machine.events.process_event_queue()
 File "/usr/local/lib/python3.4/dist-packages/mpf/core/events.py", line 488, in process_event_queue
   callback(**kwargs)
 File "/usr/local/lib/python3.4/dist-packages/mpf/devices/ball_device.py", line 1410, in _perform_eject
   self._fire_eject_coil()
 File "/usr/local/lib/python3.4/dist-packages/mpf/devices/ball_device.py", line 1472, in _fire_eject_coil
   self.config['eject_coil'].pulse()
 File "/usr/local/lib/python3.4/dist-packages/mpf/devices/driver.py", line 117, in pulse
   ms_actual = self.hw_driver.pulse(self.get_configured_driver(), milliseconds)
 File "/usr/local/lib/python3.4/dist-packages/mpf/platforms/opp/opp_coil.py", line 70, in pulse
   "Tried {}, used {}".format(milliseconds, self.config['pulse_ms']))
AssertionError: OPP platform doesn't allow changing pulse width using pulse call. Tried 10, used None

Brian Madden

unread,
Sep 19, 2016, 8:57:16 PM9/19/16
to MPF Users
HI Jeremy,

Can you post the full log and maybe your full config?

Jeremy Wilson

unread,
Sep 19, 2016, 9:01:27 PM9/19/16
to MPF Users
Find my config attached.  I'm running the latest MPF 0.30 on RPi.

The switch in question is for an eject hole.
 
hotrod.tar.gz

jabdoa

unread,
Sep 20, 2016, 9:20:00 AM9/20/16
to MPF Users
Hi Jeremy,

thanks for finding this! I fixed it in 0.30, 0.31 and 0.32(dev). We did not honor default_pulse_ms (10ms) in OPP when you did not specify a pulse_ms in your coil.


Jan
Reply all
Reply to author
Forward
0 new messages