diff -r c7b712056146 -r c6806d24468b src/eric7/MicroPython/MicroPythonWidget.py --- a/src/eric7/MicroPython/MicroPythonWidget.py Sat Feb 18 09:21:42 2023 +0100 +++ b/src/eric7/MicroPython/MicroPythonWidget.py Sat Feb 18 10:11:44 2023 +0100 @@ -1436,6 +1436,13 @@ else: downloadMenu = None + # prepare the WiFi menu + if self.__device and self.__connected and self.__device.getDeviceData("wifi"): + wifiMenu = QMenu(self.tr("WiFi Functions"), self.__superMenu) + wifiMenu.addAction(self.tr("Show WiFi Status"), self.__showWifiStatus) + else: + wifiMenu = None + # populate the super menu hasTime = self.__device.hasTimeCommands() if self.__device else False @@ -1479,6 +1486,9 @@ if self.__device: self.__device.addDeviceMenuEntries(self.__superMenu) self.__superMenu.addSeparator() + if wifiMenu is not None: + self.__superMenu.addMenu(wifiMenu) + self.__superMenu.addSeparator() if downloadMenu is None: # generic download action self.__superMenu.addAction( @@ -1988,3 +1998,22 @@ dlg.show() except Exception as exc: self.__showError("getModules()", str(exc)) + + ############################################################################ + ## WiFi related methods below + ############################################################################ + + def __showWifiStatus(self): + """ + Private method to show a dialog with the WiFi status of the current device. + """ + from .WifiStatusDialog import WifiStatusDialog + + try: + clientStatus, apStatus = self.__device.getWifiData() + + dlg = WifiStatusDialog(clientStatus, apStatus) + dlg.exec() + except Exception as exc: + self.__showError("getWifiData()", str(exc)) +