|
|
|
@ -166,9 +166,11 @@ class DialingState(AbstractState):
@@ -166,9 +166,11 @@ class DialingState(AbstractState):
|
|
|
|
|
def __init__(self, controller): |
|
|
|
|
super(DialingState, self).__init__(controller) |
|
|
|
|
self._controller.get_phone().play_dial_tone() |
|
|
|
|
self.__dial_tone = True |
|
|
|
|
self.__number = '' |
|
|
|
|
|
|
|
|
|
def __on_leave(self): |
|
|
|
|
if self.__dial_tone: |
|
|
|
|
self._controller.get_phone().stop_playing() |
|
|
|
|
self._controller.abort_timeout() |
|
|
|
|
|
|
|
|
@ -178,9 +180,11 @@ class DialingState(AbstractState):
@@ -178,9 +180,11 @@ class DialingState(AbstractState):
|
|
|
|
|
|
|
|
|
|
def on_nummernschalter_input(self, num): |
|
|
|
|
print('nummernschalter: %d' % (num)) |
|
|
|
|
if self.__dial_tone: |
|
|
|
|
self._controller.get_phone().stop_playing() |
|
|
|
|
self.__number += str(num) |
|
|
|
|
self._controller.abort_timeout() |
|
|
|
|
self._controller.set_timeout(7000) |
|
|
|
|
self._controller.set_timeout(5000) |
|
|
|
|
|
|
|
|
|
def on_timeout(self): |
|
|
|
|
self.__on_leave() |
|
|
|
|