modified: mycroft/client/enclosure/__init__.py
modified: mycroft/client/wifisetup/main.pypull/748/head
parent
19529472d7
commit
227d9c6772
|
@ -131,17 +131,17 @@ class EnclosureReader(Thread):
|
||||||
self.ws.emit(Message("mycroft.wifi.start"))
|
self.ws.emit(Message("mycroft.wifi.start"))
|
||||||
|
|
||||||
if "unit.factory-reset" in data:
|
if "unit.factory-reset" in data:
|
||||||
#self.ws.emit(
|
self.ws.emit(
|
||||||
#Message("enclosure.eyes.spin"))
|
Message("enclosure.eyes.spin"))
|
||||||
#subprocess.call(
|
subprocess.call(
|
||||||
#'rm ~/.mycroft/identity/identity2.json',
|
'rm ~/.mycroft/identity/identity2.json',
|
||||||
#shell=True)
|
shell=True)
|
||||||
self.ws.emit(Message("mycroft.wifi.reset"))
|
self.ws.emit(Message("mycroft.wifi.reset"))
|
||||||
#time.sleep(4)
|
self.ws.emit(Message("speak", {
|
||||||
#self.ws.emit(Message("enclosure.mouth.reset"))
|
'utterance': "This unit has been reset"}))
|
||||||
#self.ws.emit(Message("speak", {
|
time.sleep(4)
|
||||||
#'utterance': "This unit has been reset"}))
|
self.ws.emit(Message("enclosure.mouth.reset"))
|
||||||
#subprocess.call('systemctl reboot -i', shell=True)
|
subprocess.call('systemctl reboot -i', shell=True)
|
||||||
|
|
||||||
if "unit.enable-ssh" in data:
|
if "unit.enable-ssh" in data:
|
||||||
subprocess.call('sudo touch /boot/ssh', shell=True)
|
subprocess.call('sudo touch /boot/ssh', shell=True)
|
||||||
|
|
|
@ -549,11 +549,9 @@ class WiFi:
|
||||||
LOG.error("Error: {0}".format(e))
|
LOG.error("Error: {0}".format(e))
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
def reset(self, message):
|
def reset(self, event=None):
|
||||||
"""Resets the wifi to the default """
|
"""Resets the wifi to the default """
|
||||||
LOG.info("Resetting the WPA_SUPPLICANT File")
|
LOG.info("Resetting the WPA_SUPPLICANT File")
|
||||||
self.ws.emit(Message("speak", {
|
|
||||||
'utterance': "Erasing Wireless Networks"}))
|
|
||||||
try:
|
try:
|
||||||
subprocess.call(
|
subprocess.call(
|
||||||
"echo " + WPA_SUPPLICANT +
|
"echo " + WPA_SUPPLICANT +
|
||||||
|
|
Loading…
Reference in New Issue