Skip to content

Commit

Permalink
Merge pull request #30 from missionpinball/holdpatter-fix
Browse files Browse the repository at this point in the history
Bug Fix: holdPatter config changed to holdpatter
  • Loading branch information
toomanybrians committed May 5, 2015
2 parents 0e93933 + c681283 commit 8263f3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions mpf/devices/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ def __init__(self, machine, name, config, collection=None):
self.log.debug("Creating '%s' with config: %s", name, config)

if 'pulse_ms' not in self.config:
# If there's a holdPatter and no pulse_ms, we'll keep it at zero
if 'holdPatter' in self.config:
# If there's a holdpatter and no pulse_ms, we'll keep it at zero
if 'holdpatter' in self.config:
self.config['pulse_ms'] = 0
# Otherwise we'll use the system default for pulse_ms
else:
self.config['pulse_ms'] = \
self.machine.config['mpf']['default_pulse_ms']

if 'holdPatter' in self.config:
self.config['pwm_on'] = int(config['holdPatter'].split('-')[0])
self.config['pwm_off'] = int(config['holdPatter'].split('-')[1])
if 'holdpatter' in self.config:
self.config['pwm_on'] = int(config['holdpatter'].split('-')[0])
self.config['pwm_off'] = int(config['holdpatter'].split('-')[1])
else:
self.config['pwm_on'] = 0
self.config['pwm_off'] = 0
Expand All @@ -70,8 +70,8 @@ def __init__(self, machine, name, config, collection=None):
def enable(self):
"""Enables a driver by holding it 'on'.
If this driver is configured with a holdPatter, then this method will use
that holdPatter to pwm pulse the driver.
If this driver is configured with a holdpatter, then this method will use
that holdpatter to pwm pulse the driver.
If not, then this method will just enable the driver. As a safety
precaution, if you want to enable() this driver without pwm, then you
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = ('0', '17', '0')
__version_info__ = ('0', '17', '1')
__version__ = '.'.join(__version_info__)

__bcp_version_info__ = ('1', '0')
Expand Down

0 comments on commit 8263f3b

Please sign in to comment.