src/eric7/MicroPython/Devices/RP2Devices.py

branch
eric7
changeset 11166
fd914f897dcf
parent 11148
15e30f0c76a8
child 11167
a3f5af773bc7
diff -r 24e1beb8779a -r fd914f897dcf src/eric7/MicroPython/Devices/RP2Devices.py
--- a/src/eric7/MicroPython/Devices/RP2Devices.py	Thu Mar 06 17:44:49 2025 +0100
+++ b/src/eric7/MicroPython/Devices/RP2Devices.py	Sun Mar 09 14:16:35 2025 +0100
@@ -57,6 +57,7 @@
                 1: self.tr("connecting"),
                 2: self.tr("connected, waiting for IP address"),
                 3: self.tr("connected"),
+                103: self.tr("AP listening"),
             },
             "picowireless": {
                 0: self.tr("idle"),
@@ -631,7 +632,12 @@
             # translate the numerical status to a string
             try:
                 ap["status"] = self.__statusTranslations[self._deviceData["wifi_type"]][
-                    ap["status"]
+                    (
+                        103
+                        if self._deviceData["wifi_type"] == "picow"
+                        and ap["status"] == 3
+                        else ap["status"]
+                    )
                 ]
             except KeyError:
                 ap["status"] = str(ap["status"])
@@ -1206,7 +1212,7 @@
         ap.ifconfig(ifconfig)
     ap.config(ssid=ssid, security=security, password=password)
     sleep(0.1)
-    print(ap.isconnected())
+    print(ap.status() == network.STAT_GOT_IP)
 
 start_ap({0}, {1}, {2}, {3}, {4}, {5})
 del start_ap

eric ide

mercurial