arduino.py 文件源码

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

项目:xideco 作者: MrYsLab 项目源码 文件源码
def receive_loop(self):
        """
        This is the receive loop for zmq messages
        It is assumed that this method will be overwritten to meet the needs of the application and to handle
        received messages.
        :return:
        """
        while True:
            try:
                data = self.subscriber.recv_multipart(zmq.NOBLOCK)
                self.incoming_message_processing(data[0].decode(), umsgpack.unpackb(data[1]))
                self.board.sleep(.01)
            except zmq.error.Again:
                try:
                    self.board.sleep(.01)
                except:
                    self.clean_up()
            except KeyboardInterrupt:
                self.clean_up()

    # noinspection PyMethodMayBeStatic
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号