diff --git a/listeners.py b/listeners.py index dd968a8..974b093 100644 --- a/listeners.py +++ b/listeners.py @@ -23,7 +23,7 @@ class KeypadListener: - input listener that accepts events and reacts in fun ways - countdown timer to reset the input buffer after 30 seconds of inactivity ''' - def __init__(self, stateMachine, callbackDisarm, callbackArm, soundLib, passwd): + def __init__(self, stateMachine, callbackDisarm, callbackArm, passwd): ctrlKeys = { 69: 'NUML', 98: '/', 14: 'BS', 96: 'ENTER'} @@ -36,6 +36,8 @@ class KeypadListener: 82: '0', 83: '.' } + soundLib = stateMachine.soundLib + numKeySound = soundLib.soundEffects['numKey'] ctrlKeySound = soundLib.soundEffects['ctrlKey'] wrongPassSound = soundLib.soundEffects['wrongPass'] diff --git a/stateMachine.py b/stateMachine.py index 036a07d..630d583 100644 --- a/stateMachine.py +++ b/stateMachine.py @@ -137,7 +137,6 @@ class StateMachine: stateMachine = self, callbackDisarm = self.DISARM, callbackArm = self.ARM, - soundLib = self.soundLib, passwd = '5918462' ) )