eric6/Preferences/__init__.py

branch
micropython
changeset 7086
b757db426076
parent 7069
a09a30251d4e
child 7099
89f11ae6bec3
--- a/eric6/Preferences/__init__.py	Sat Jul 27 15:40:51 2019 +0200
+++ b/eric6/Preferences/__init__.py	Sat Jul 27 15:41:52 2019 +0200
@@ -1592,6 +1592,7 @@
     
     # defaults for MicroPython
     microPythonDefaults = {
+        "SerialTimeout": 10000,         # timeout in milliseconds
     }
     if Globals.isWindowsPlatform():
         microPythonDefaults["ColorScheme"] = "Windows 10"
@@ -3821,9 +3822,14 @@
     @param prefClass preferences class used as the storage area
     @return the requested MicroPython value
     """
-    return prefClass.settings.value(
-        "MicroPython/" + key,
-        prefClass.microPythonDefaults[key])
+    if key in ("SerialTimeout"):
+        return int(prefClass.settings.value(
+            "MicroPython/" + key,
+            prefClass.microPythonDefaults[key]))
+    else:
+        return prefClass.settings.value(
+            "MicroPython/" + key,
+            prefClass.microPythonDefaults[key])
 
 
 def setMicroPython(key, value, prefClass=Prefs):

eric ide

mercurial