24 from eric7.EricWidgets.EricProcessDialog import EricProcessDialog |
24 from eric7.EricWidgets.EricProcessDialog import EricProcessDialog |
25 from eric7.SystemUtilities import PythonUtilities |
25 from eric7.SystemUtilities import PythonUtilities |
26 |
26 |
27 from ..MicroPythonWidget import HAS_QTCHART |
27 from ..MicroPythonWidget import HAS_QTCHART |
28 from . import FirmwareGithubUrls |
28 from . import FirmwareGithubUrls |
|
29 from .CircuitPythonDevices import CircuitPythonDevice |
29 from .DeviceBase import BaseDevice |
30 from .DeviceBase import BaseDevice |
30 from .CircuitPythonDevices import CircuitPythonDevice |
|
31 |
31 |
32 |
32 |
33 class EspDevice(BaseDevice): |
33 class EspDevice(BaseDevice): |
34 """ |
34 """ |
35 Class implementing the device for ESP32 and ESP8266 based boards. |
35 Class implementing the device for ESP32 and ESP8266 based boards. |
373 """ |
373 """ |
374 Private slot to show the firmware version of the connected device and the |
374 Private slot to show the firmware version of the connected device and the |
375 available firmware version. |
375 available firmware version. |
376 """ |
376 """ |
377 if self.hasCircuitPython(): |
377 if self.hasCircuitPython(): |
378 return self.__cpyDevice.showCircuitPythonVersions() |
378 self.__cpyDevice.showCircuitPythonVersions() |
379 |
379 |
380 if self.microPython.isConnected(): |
380 if self.microPython.isConnected(): |
381 if self._deviceData["mpy_name"] == "micropython": |
381 if self._deviceData["mpy_name"] == "micropython": |
382 url = QUrl(FirmwareGithubUrls["micropython"]) |
382 url = QUrl(FirmwareGithubUrls["micropython"]) |
383 elif self._deviceData["mpy_name"] == "circuitpython": |
383 elif self._deviceData["mpy_name"] == "circuitpython": |
1360 """ |
1360 """ |
1361 Public method to check the availability of network time functions. |
1361 Public method to check the availability of network time functions. |
1362 |
1362 |
1363 @return flag indicating the availability of network time functions |
1363 @return flag indicating the availability of network time functions |
1364 @rtype bool |
1364 @rtype bool |
|
1365 @exception OSError raised to indicate an issue with the device |
1365 """ |
1366 """ |
1366 if self.hasCircuitPython(): |
1367 if self.hasCircuitPython(): |
1367 self.__createCpyDevice() |
1368 self.__createCpyDevice() |
1368 return self.__cpyDevice.hasNetworkTime() |
1369 return self.__cpyDevice.hasNetworkTime() |
1369 |
1370 |