MicroPython: corrected the time synchronisation for the PyBoard.

Fri, 01 Nov 2019 16:05:15 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 01 Nov 2019 16:05:15 +0100
changeset 7321
3642cc5df144
parent 7320
5f888d21ef3e
child 7322
cd8ee889589f
child 7324
8610ae96ad7b

MicroPython: corrected the time synchronisation for the PyBoard.

eric6/MicroPython/MicroPythonCommandsInterface.py file | annotate | diff | comparison | revisions
eric6/MicroPython/MicroPythonWidget.py file | annotate | diff | comparison | revisions
eric6/MicroPython/PyBoardDevices.py file | annotate | diff | comparison | revisions
--- a/eric6/MicroPython/MicroPythonCommandsInterface.py	Wed Oct 30 19:47:55 2019 +0100
+++ b/eric6/MicroPython/MicroPythonCommandsInterface.py	Fri Nov 01 16:05:15 2019 +0100
@@ -760,7 +760,8 @@
                 "    try:",           # Pyboard (it doesn't have machine.RTC())
                 "        import pyb as __pyb_",
                 "        rtc = __pyb_.RTC()",
-                "        clock_time = rtc_time[:6] + (rtc_time[6] + 1, 0)",
+                "        clock_time = rtc_time[:3] +"
+                " (rtc_time[6] + 1,) + rtc_time[3:6] + (0,)",
                 "        rtc.datetime(clock_time)",
                 "        del __pyb_",
                 "    except Exception:",
--- a/eric6/MicroPython/MicroPythonWidget.py	Wed Oct 30 19:47:55 2019 +0100
+++ b/eric6/MicroPython/MicroPythonWidget.py	Fri Nov 01 16:05:15 2019 +0100
@@ -1109,6 +1109,7 @@
             act.setEnabled(self.__connected)
         self.__superMenu.addAction(
             self.tr("Show Local Time"), self.__showLocalTime)
+        # TODO: add entry to show local and device time side-by-side
         self.__superMenu.addSeparator()
         if not Globals.isWindowsPlatform():
             available = self.__mpyCrossAvailable()
--- a/eric6/MicroPython/PyBoardDevices.py	Wed Oct 30 19:47:55 2019 +0100
+++ b/eric6/MicroPython/PyBoardDevices.py	Fri Nov 01 16:05:15 2019 +0100
@@ -186,6 +186,7 @@
         menu.addAction(
             self.tr("MicroPython Install Instructions"),
             self.__showInstallInstructions)
+        # TODO: add entry to flash a new firmware using dfu-util
     
     def __showInstallInstructions(self):
         """

eric ide

mercurial