mirror of
https://github.com/clockworkpi/launcher.git
synced 2026-04-28 17:09:32 +02:00
gateway switch bug fix
This commit is contained in:
@@ -213,18 +213,18 @@ class GateWayPage(Page):
|
|||||||
parts[3] = str(tmp)
|
parts[3] = str(tmp)
|
||||||
ipaddress = ".".join(parts)
|
ipaddress = ".".join(parts)
|
||||||
os.system("sudo route add default gw "+ipaddress)
|
os.system("sudo route add default gw "+ipaddress)
|
||||||
return true
|
return True
|
||||||
else:
|
else:
|
||||||
if is_wifi_connected_now():
|
if is_wifi_connected_now():
|
||||||
os.system("sudo dhclient wlan0")
|
os.system("sudo dhclient wlan0")
|
||||||
return true
|
return True
|
||||||
else:
|
else:
|
||||||
self._Screen._MsgBox.SetText("Wi-Fi is not connected")
|
self._Screen._MsgBox.SetText("Wi-Fi is not connected")
|
||||||
self._Screen._MsgBox.Draw()
|
self._Screen._MsgBox.Draw()
|
||||||
self._Screen.SwapAndShow()
|
self._Screen.SwapAndShow()
|
||||||
return false
|
return False
|
||||||
|
|
||||||
return false
|
return False
|
||||||
|
|
||||||
|
|
||||||
def OnLoadCb(self):
|
def OnLoadCb(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user