src/eric7/MicroPython/Devices/RP2040Devices.py

branch
eric7
changeset 10138
56614cf9d03c
parent 10089
5fe9bfafbc7c
child 10144
45a9177c8e77
--- a/src/eric7/MicroPython/Devices/RP2040Devices.py	Sat Jul 29 16:45:57 2023 +0200
+++ b/src/eric7/MicroPython/Devices/RP2040Devices.py	Sat Jul 29 19:27:18 2023 +0200
@@ -599,7 +599,7 @@
                 ][station["status"]]
             except KeyError:
                 station["status"] = str(station["status"])
-        if "status" in station:
+        if "status" in ap:
             # translate the numerical status to a string
             try:
                 ap["status"] = self.__statusTranslations[self._deviceData["wifi_type"]][
@@ -714,6 +714,8 @@
             except KeyError:
                 error = str(result["status"])
 
+        self._networkConnected = result["connected"]
+
         return result["connected"], error
 
     def disconnectWifi(self):
@@ -759,6 +761,8 @@
         if err:
             return False, err
 
+        self._networkConnected = False
+
         return out.decode("utf-8").strip() == "True", ""
 
     def writeCredentials(self, ssid, password):
@@ -1609,6 +1613,8 @@
         if err:
             return False, err
 
+        self._networkConnected = True
+
         return out.strip() == b"True", ""
 
     def disconnectFromLan(self):
@@ -1641,6 +1647,8 @@
         if err:
             return False, err
 
+        self._networkConnected = False
+
         return out.strip() == b"True", ""
 
     def checkInternetViaLan(self):

eric ide

mercurial