fix(examples) import 'u'-prefixed versions of modules (#2365)
import usys and utime instead of sys and time, as the latter are not available on all platforms
This commit is contained in:
@@ -1,10 +1,7 @@
|
|||||||
#!/opt/bin/lv_micropython -i
|
#!/opt/bin/lv_micropython -i
|
||||||
|
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
try:
|
import usys as sys
|
||||||
import sys
|
|
||||||
except ImportError:
|
|
||||||
import usys as sys
|
|
||||||
|
|
||||||
# JS requires a special import
|
# JS requires a special import
|
||||||
if sys.platform == 'javascript':
|
if sys.platform == 'javascript':
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/opt/bin/lv_micropython -i
|
#!/opt/bin/lv_micropython -i
|
||||||
import time
|
import utime as time
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/opt/bin/lv_micropython -i
|
#!/opt/bin/lv_micropython -i
|
||||||
import sys
|
import usys as sys
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
from imagetools import get_png_info, open_png
|
from imagetools import get_png_info, open_png
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/opt/bin/lv_micropython -i
|
#!/opt/bin/lv_micropython -i
|
||||||
import sys
|
import usys as sys
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
from imagetools import get_png_info, open_png
|
from imagetools import get_png_info, open_png
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/opt/bin/lv_micropython -i
|
#!/opt/bin/lv_micropython -i
|
||||||
import sys
|
import usys as sys
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
from imagetools import get_png_info, open_png
|
from imagetools import get_png_info, open_png
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!//opt/bin/lv_micropython -i
|
#!//opt/bin/lv_micropython -i
|
||||||
import time
|
import utime as time
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!//opt/bin/lv_micropython -i
|
#!//opt/bin/lv_micropython -i
|
||||||
import time
|
import utime as time
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!//opt/bin/lv_micropython -i
|
#!//opt/bin/lv_micropython -i
|
||||||
import time
|
import utime as time
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
from imagetools import get_png_info, open_png
|
from imagetools import get_png_info, open_png
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/opt/bin/lv_micropython -i
|
#!/opt/bin/lv_micropython -i
|
||||||
import time
|
import utime as time
|
||||||
import lvgl as lv
|
import lvgl as lv
|
||||||
import display_driver
|
import display_driver
|
||||||
import sys
|
import usys as sys
|
||||||
|
|
||||||
class Lv_Roller_3():
|
class Lv_Roller_3():
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user