utils.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:BlueDot 作者: martinohanlon 项目源码 文件源码
def device_pairable(device_name, pairable):
    bus = dbus.SystemBus()
    adapter_path = find_adapter(device_name).object_path
    adapter = dbus.Interface(bus.get_object(SERVICE_NAME, adapter_path),"org.freedesktop.DBus.Properties")
    if pairable:
        value = dbus.Boolean(1)
    else:
        value = dbus.Boolean(0)
    adapter.Set(ADAPTER_INTERFACE, "Pairable", value)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号