Sun, 12 Mar 2023 16:10:56 +0100
Fixed a bug in the recently added µPy code.
--- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html Sun Mar 12 14:57:37 2023 +0100 +++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html Sun Mar 12 16:10:56 2023 +0100 @@ -1557,13 +1557,14 @@ <dl> <dt>Return:</dt> <dd> -flag indicating the availability of Ethernet +tuple containing a flag indicating the availability of Ethernet + and the Ethernet type </dd> </dl> <dl> <dt>Return Type:</dt> <dd> -bool +tuple of (bool, str) </dd> </dl> <a NAME="BaseDevice.hasFirmwareUrl" ID="BaseDevice.hasFirmwareUrl"></a>
--- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.RP2040Devices.html Sun Mar 12 14:57:37 2023 +0100 +++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.RP2040Devices.html Sun Mar 12 16:10:56 2023 +0100 @@ -803,13 +803,14 @@ <dl> <dt>Return:</dt> <dd> -flag indicating the availability of Ethernet +tuple containing a flag indicating the availability of Ethernet + and the Ethernet type (picowiz) </dd> </dl> <dl> <dt>Return Type:</dt> <dd> -bool +tuple of (bool, str) </dd> </dl> <dl>
--- a/src/eric7/MicroPython/Devices/DeviceBase.py Sun Mar 12 14:57:37 2023 +0100 +++ b/src/eric7/MicroPython/Devices/DeviceBase.py Sun Mar 12 16:10:56 2023 +0100 @@ -1459,10 +1459,11 @@ """ Public method to check the availability of Ethernet. - @return flag indicating the availability of Ethernet - @rtype bool + @return tuple containing a flag indicating the availability of Ethernet + and the Ethernet type + @rtype tuple of (bool, str) """ - return False + return False, "" def addDeviceEthernetEntries(self, menu): """
--- a/src/eric7/MicroPython/Devices/RP2040Devices.py Sun Mar 12 14:57:37 2023 +0100 +++ b/src/eric7/MicroPython/Devices/RP2040Devices.py Sun Mar 12 16:10:56 2023 +0100 @@ -470,7 +470,8 @@ if not err.startswith(b"Timeout "): raise OSError(self._shortError(err)) else: - return False # pimoroni firmware loaded but no pico wireless present + # pimoroni firmware loaded but no pico wireless present + return False, "" return ast.literal_eval(out.decode("utf-8")) def getWifiData(self): @@ -1188,8 +1189,9 @@ """ Public method to check the availability of Ethernet. - @return flag indicating the availability of Ethernet - @rtype bool + @return tuple containing a flag indicating the availability of Ethernet + and the Ethernet type (picowiz) + @rtype tuple of (bool, str) @exception OSError raised to indicate an issue with the device """ command = """ @@ -1211,10 +1213,8 @@ command, mode=self._submitMode, timeout=10000 ) if err: - if not err.startswith(b"Timeout "): - raise OSError(self._shortError(err)) - else: - return False # pimoroni firmware loaded but no pico wireless present + raise OSError(self._shortError(err)) + return ast.literal_eval(out.decode("utf-8")) def getEthernetStatus(self):