From 2438f66ef0162ffac2990ae2e49db74a64a907f4 Mon Sep 17 00:00:00 2001 From: Jonathan D'Orleans Date: Mon, 26 Sep 2016 17:55:36 -0400 Subject: [PATCH] Issues 356 - Updating mouth events call --- mycroft/skills/ip_skill/__init__.py | 4 ++-- mycroft/skills/spelling/__init__.py | 4 ++-- mycroft/skills/stock/__init__.py | 4 ++-- mycroft/skills/weather/__init__.py | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mycroft/skills/ip_skill/__init__.py b/mycroft/skills/ip_skill/__init__.py index 5d89bb9f92..038a6df637 100644 --- a/mycroft/skills/ip_skill/__init__.py +++ b/mycroft/skills/ip_skill/__init__.py @@ -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): diff --git a/mycroft/skills/spelling/__init__.py b/mycroft/skills/spelling/__init__.py index 98c5eea64e..c8156024a2 100644 --- a/mycroft/skills/spelling/__init__.py +++ b/mycroft/skills/spelling/__init__.py @@ -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): diff --git a/mycroft/skills/stock/__init__.py b/mycroft/skills/stock/__init__.py index 2386864553..a11a3df38f 100644 --- a/mycroft/skills/stock/__init__.py +++ b/mycroft/skills/stock/__init__.py @@ -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: diff --git a/mycroft/skills/weather/__init__.py b/mycroft/skills/weather/__init__.py index adca13b25a..1a5b0bb3f7 100644 --- a/mycroft/skills/weather/__init__.py +++ b/mycroft/skills/weather/__init__.py @@ -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: