Issues 356 - Updating mouth events call

pull/420/head
Jonathan D'Orleans 2016-09-26 17:55:36 -04:00
parent 86e712ec84
commit 2438f66ef0
4 changed files with 12 additions and 12 deletions

View File

@ -46,7 +46,7 @@ class IPSkill(MycroftSkill):
def handle_intent(self, message):
self.speak("Here are my available I.P. addresses.")
self.enclosure.activate_mouth_listeners(False)
self.enclosure.deactivate_mouth_events()
for ifaceName in interfaces():
addresses = [
i['addr'] for i in
@ -65,7 +65,7 @@ class IPSkill(MycroftSkill):
self.enclosure.mouth_text(address)
time.sleep((self.LETTERS_PER_SCREEN + len(address)) *
self.SEC_PER_LETTER)
self.enclosure.activate_mouth_listeners(True)
self.enclosure.activate_mouth_events()
self.speak("Those are all my I.P. addresses.")
def stop(self):

View File

@ -47,10 +47,10 @@ class SpellingSkill(MycroftSkill):
self.emitter.once("recognizer_loop:audio_output_start",
self.enclosure.mouth_text(word))
spelled_word = ', '.join(word).lower()
self.enclosure.activate_mouth_listeners(False)
self.enclosure.deactivate_mouth_events()
self.speak(spelled_word)
time.sleep((self.LETTERS_PER_SCREEN + len(word)) * self.SEC_PER_LETTER)
self.enclosure.activate_mouth_listeners(True)
self.enclosure.activate_mouth_events()
self.enclosure.mouth_reset()
def stop(self):

View File

@ -49,10 +49,10 @@ class StockSkill(MycroftSkill):
self.enclosure.mouth_text(
response['symbol'] + ": " + response[
'price']))
self.enclosure.activate_mouth_listeners(False)
self.enclosure.deactivate_mouth_events()
self.speak_dialog("stock.price", data=response)
time.sleep(12)
self.enclosure.activate_mouth_listeners(True)
self.enclosure.activate_mouth_events()
self.enclosure.mouth_reset()
except:

View File

@ -83,11 +83,11 @@ class WeatherSkill(MycroftSkill):
weather_code = str(weather.get_weather_icon_name())
img_code = self.CODES[weather_code]
temp = data['temp_current']
self.enclosure.activate_mouth_listeners(False)
self.enclosure.deactivate_mouth_events()
self.enclosure.weather_display(img_code, temp)
self.speak_dialog('current.weather', data)
time.sleep(5)
self.enclosure.activate_mouth_listeners(True)
self.enclosure.activate_mouth_events()
except APICallError as e:
self.__api_error(e)
except Exception as e:
@ -103,11 +103,11 @@ class WeatherSkill(MycroftSkill):
weather_code = str(weather.get_weather_icon_name())
img_code = self.CODES[weather_code]
temp = data['temp_current']
self.enclosure.activate_mouth_listeners(False)
self.enclosure.deactivate_mouth_events()
self.enclosure.weather_display(img_code, temp)
self.speak_dialog('hour.weather', data)
time.sleep(5)
self.enclosure.activate_mouth_listeners(True)
self.enclosure.activate_mouth_events()
except APICallError as e:
self.__api_error(e)
except Exception as e:
@ -123,11 +123,11 @@ class WeatherSkill(MycroftSkill):
weather_code = str(weather.get_weather_icon_name())
img_code = self.CODES[weather_code]
temp = data['temp_current']
self.enclosure.activate_mouth_listeners(False)
self.enclosure.deactivate_mouth_events()
self.enclosure.weather_display(img_code, temp)
self.speak_dialog('tomorrow.weather', data)
time.sleep(5)
self.enclosure.activate_mouth_listeners(True)
self.enclosure.activate_mouth_events()
except APICallError as e:
self.__api_error(e)
except Exception as e: