Skip to content

Commit

Permalink
able to set settings to the voice enabled eye color so it can be push…
Browse files Browse the repository at this point in the history
…ed to web
  • Loading branch information
LearnedVector committed Dec 7, 2017
1 parent ee9040c commit 7ecf350
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def handle_eye_color(self, message):
color = message.data.get('color', None)
if color is not None:
self.set_eye_color(color=color)
self.settings['eye color'] = color
else:
self.set_converse('need.color')
self.speak_dialog(
Expand Down Expand Up @@ -384,7 +385,7 @@ def need_custom_dialog(self, error=""):
def set_converse(self, context):
""" to invoke the converse method
Args:
Args:
context (str): string to set context for converse
"""
self.should_converse = True
Expand All @@ -404,7 +405,7 @@ def converse(self, utterances, lang='en-us'):
utterances (str): utterances said to mycroft
lang (str): languge of utterance (currently not used)
"""
utt = utterances[0]
utt = utterances[0]
if self.converse_context == 'need.color':
found_color = False
for color in self.color_dict:
Expand All @@ -423,6 +424,7 @@ def converse(self, utterances, lang='en-us'):
self.need_custom_dialog()
if len(self.custom_rgb) == 3:
self.set_eye_color(rgb=self.custom_rgb)
self.settings['eye color'] = self.custom_rgb
self.reset_converse()
return True
else:
Expand Down

0 comments on commit 7ecf350

Please sign in to comment.