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"))
|
||||
|
||||
if "unit.factory-reset" in data:
|
||||
#self.ws.emit(
|
||||
#Message("enclosure.eyes.spin"))
|
||||
#subprocess.call(
|
||||
#'rm ~/.mycroft/identity/identity2.json',
|
||||
#shell=True)
|
||||
self.ws.emit(
|
||||
Message("enclosure.eyes.spin"))
|
||||
subprocess.call(
|
||||
'rm ~/.mycroft/identity/identity2.json',
|
||||
shell=True)
|
||||
self.ws.emit(Message("mycroft.wifi.reset"))
|
||||
#time.sleep(4)
|
||||
#self.ws.emit(Message("enclosure.mouth.reset"))
|
||||
#self.ws.emit(Message("speak", {
|
||||
#'utterance': "This unit has been reset"}))
|
||||
#subprocess.call('systemctl reboot -i', shell=True)
|
||||
self.ws.emit(Message("speak", {
|
||||
'utterance': "This unit has been reset"}))
|
||||
time.sleep(4)
|
||||
self.ws.emit(Message("enclosure.mouth.reset"))
|
||||
subprocess.call('systemctl reboot -i', shell=True)
|
||||
|
||||
if "unit.enable-ssh" in data:
|
||||
subprocess.call('sudo touch /boot/ssh', shell=True)
|
||||
|
|
|
@ -549,11 +549,9 @@ class WiFi:
|
|||
LOG.error("Error: {0}".format(e))
|
||||
self.stop()
|
||||
|
||||
def reset(self, message):
|
||||
def reset(self, event=None):
|
||||
"""Resets the wifi to the default """
|
||||
LOG.info("Resetting the WPA_SUPPLICANT File")
|
||||
self.ws.emit(Message("speak", {
|
||||
'utterance': "Erasing Wireless Networks"}))
|
||||
try:
|
||||
subprocess.call(
|
||||
"echo " + WPA_SUPPLICANT +
|
||||
|
|
Loading…
Reference in New Issue