You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ev3dev version: 4.14.61-ev3dev-2.2.2-ev3
ev3dev-lang-python version:
ii python3-ev3dev 1.2.0 all Python language bindings for ev3dev
ii python3-ev3dev2 2.0.0~beta1 all Python language bindings for ev3dev
This script seems to show that it takes more than 3s for the screen to update in EV3 Python v2:
#!/usr/bin/env python3
# v2
from ev3dev2.display import Display
from sys import stderr
from time import sleep, time
screen = Display()
start_time = time()
for i in range(10):
screen.update()
print(time()-start_time, file=stderr)
Result:
3.3111462593078613
6.4367356300354
9.531918287277222
12.596878051757812
15.702414512634277
18.824042558670044
21.96616840362549
25.0904278755188
28.212737321853638
31.273113012313843 Average update time 3.13s assuming other code takes insignificant time.
The Python 1 script below gives average update time of 0.73s, or more than four times faster than for v2:
#!/usr/bin/env python3
# v1
from ev3dev.ev3 import *
from sys import stderr
from time import sleep, time
screen = Screen()
start_time = time()
for i in range(10):
screen.update()
print(time()-start_time, file=stderr)
Activity
WasabiFan commentedon Sep 19, 2018
We have implemented a fix which will be available with the next release. #497
WasabiFan commentedon Sep 24, 2018
Fix released in
2.0.0~beta2. To upgrade: