]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Exporting time symbols not modules
authorCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 13:58:32 +0000 (13:58 +0000)
committerCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 13:58:32 +0000 (13:58 +0000)
python/agnostic.py

index 1d0881d2375573965a80f7341bfd5e8ed4549251..167b4d607b4d46f7afc7c70678a1645bb13c6964 100644 (file)
@@ -11,20 +11,19 @@ try:
 except:
     microcontroller = None
 
 except:
     microcontroller = None
 
-# TODO switch name of platform below to be microcontroller
 if microcontroller is not None:
     if microcontroller == "esp8266":
         board = "feather_huzzah"
     elif microcontroller == "samd21":
 if microcontroller is not None:
     if microcontroller == "esp8266":
         board = "feather_huzzah"
     elif microcontroller == "samd21":
-        board="feather_m0_express"
+        board = "feather_m0_express"
     elif microcontroller == "pyboard":
     elif microcontroller == "pyboard":
-        microcontroller= "stm32"
-        board="pyboard"
+        microcontroller = "stm32"
+        board = "pyboard"
 else:
     board = None
 
 implementation = sys.implementation.name
 if implementation == "micropython":
 else:
     board = None
 
 implementation = sys.implementation.name
 if implementation == "micropython":
-    import utime as time
+    from utime import sleep, time
 elif implementation == "circuitpython":
 elif implementation == "circuitpython":
-    import time
\ No newline at end of file
+    from time import sleep, time