summaryrefslogtreecommitdiff
path: root/py/db.py
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-05-20 22:09:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-05-23 09:43:27 +0300
commit6d13ebbb8b9854713a5597df71a12f8dd9a36c34 (patch)
tree874148f1f3be655df557e01ecefe03570b0dbe47 /py/db.py
parentd37da4a303ab2760103ef8302cb1778f8860f16f (diff)
Use pybind11 instead of SWIG
Diffstat (limited to 'py/db.py')
-rwxr-xr-xpy/db.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/db.py b/py/db.py
index ce1a54e..c51ca70 100755
--- a/py/db.py
+++ b/py/db.py
@@ -24,16 +24,16 @@ class FlipHandler(pykms.PageFlipHandlerBase):
self.front_buf = self.front_buf ^ 1
current_xpos = self.bar_xpos;
- old_xpos = (current_xpos + (fb.width() - bar_width - bar_speed)) % (fb.width() - bar_width);
- new_xpos = (current_xpos + bar_speed) % (fb.width() - bar_width);
+ old_xpos = (current_xpos + (fb.width - bar_width - bar_speed)) % (fb.width - bar_width);
+ new_xpos = (current_xpos + bar_speed) % (fb.width - bar_width);
self.bar_xpos = new_xpos
pykms.draw_color_bar(fb, old_xpos, new_xpos, bar_width)
- if card.has_atomic():
+ if card.has_atomic:
ctx = pykms.AtomicReq(card)
- ctx.add(crtc, "FB_ID", fb.id())
+ ctx.add(crtc, "FB_ID", fb.id)
ctx.commit(self)
else:
crtc.page_flip(fb, self)
@@ -61,7 +61,7 @@ def readkey(conn, mask):
exit(0)
sel = selectors.DefaultSelector()
-sel.register(card.fd(), selectors.EVENT_READ, readdrm)
+sel.register(card.fd, selectors.EVENT_READ, readdrm)
sel.register(sys.stdin, selectors.EVENT_READ, readkey)
while True: