summaryrefslogtreecommitdiff
path: root/py/iact.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/iact.py')
-rwxr-xr-xpy/iact.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/py/iact.py b/py/iact.py
index 073e4ca..82511c3 100755
--- a/py/iact.py
+++ b/py/iact.py
@@ -6,6 +6,7 @@ import pykms
from time import sleep
from math import sin
from math import cos
+from helpers import *
card = pykms.Card()
@@ -21,29 +22,22 @@ crtc = conn.get_current_crtc()
#crtc.set_mode(conn, fb, mode)
i = 0
-for p in card.get_planes():
+for p in card.planes:
globals()["plane"+str(i)] = p
i=i+1
i = 0
-for c in card.get_crtcs():
+for c in card.crtcs:
globals()["crtc"+str(i)] = c
i=i+1
-for p in crtc.get_possible_planes():
- if p.plane_type() == 0:
+for p in crtc.possible_planes:
+ if p.plane_type == pykms.PlaneType.Overlay:
plane = p
break
def set_plane(x, y):
- crtc.set_plane(plane, fb, x, y, fb.width(), fb.height(), 0, 0, fb.width(), fb.height())
-
-def props(o):
- o.refresh_props()
- map = o.get_prop_map()
- for propid in map:
- prop = card.get_prop(propid)
- print("%-15s %d (%#x)" % (prop.name(), map[propid], map[propid]))
+ crtc.set_plane(plane, fb, x, y, fb.width, fb.height, 0, 0, fb.width, fb.height)
set_plane(0, 0)