diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-05-20 22:09:35 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-05-23 09:43:27 +0300 |
commit | 6d13ebbb8b9854713a5597df71a12f8dd9a36c34 (patch) | |
tree | 874148f1f3be655df557e01ecefe03570b0dbe47 /py/iact.py | |
parent | d37da4a303ab2760103ef8302cb1778f8860f16f (diff) |
Use pybind11 instead of SWIG
Diffstat (limited to 'py/iact.py')
-rwxr-xr-x | py/iact.py | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -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) |