summaryrefslogtreecommitdiff
path: root/py/pykms
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2017-04-07 13:26:12 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-04-26 11:04:08 +0300
commit494e0dbd4e84da686bc958e421af0c6fbcee85f2 (patch)
tree39a00e95c498b9b2693fe21e89c67f842844cb83 /py/pykms
parentcfc1318f7ac480622f5bd70f1f9fbf97fe7d906d (diff)
Add Connector.connected to pykmsbase
It can be used to check if the connector is connected or not Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/pykms')
-rw-r--r--py/pykms/pykmsbase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index 4d4559d..c371a0b 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -43,6 +43,7 @@ void init_pykmsbase(py::module &m)
.def("get_modes", &Connector::get_modes)
.def("get_mode", (Videomode (Connector::*)(const string& mode) const)&Connector::get_mode)
.def("get_mode", (Videomode (Connector::*)(unsigned xres, unsigned yres, float refresh, bool ilace) const)&Connector::get_mode)
+ .def("connected", &Connector::connected)
.def("__repr__", [](const Connector& o) { return "<pykms.Connector " + to_string(o.id()) + ">"; })
.def("refresh", &Connector::refresh)
;