peripheral.py 文件源码

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

项目:python-bluezero 作者: ukBaz 项目源码 文件源码
def send_notify_event(self, value):
        """Send a notification event.

        :param value: the value that the characteristic is to be set to.

        This function sets the characteristic value, and if the characteristic
        is set to notify emits a PropertiesChanged() signal with the new value.
        """
        # print('send', self, value)
        self.value = value
        if not self.notifying:
            print('Not notifying')
            return
        # print('Update prop')
        self.PropertiesChanged(
            constants.GATT_CHRC_IFACE,
            {'Value': [dbus.Byte(self.value)]}, [])

####################
# Descriptor Classes
####################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号