wiicop.py 文件源码

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

项目:wiicop 作者: barnabuskev 项目源码 文件源码
def __init__ (self,bb,cal_mod,BB_X,BB_Y):
        threading.Thread.__init__(self)
        self.runflag = True
        self.storeflag = False
        self.n_s = 4
        self.bbdev = xwiimote.iface(bb.sys_path)
        self.p = select.poll()
        self.p.register(self.bbdev.get_fd(), select.POLLIN)
        # open bb device
        self.bbdev.open(xwiimote.IFACE_BALANCE_BOARD)
        # create xwiimote event structure
        self.revt = xwiimote.event()
        # create numpy array to store data from board
        self.tmp_dat = np.empty((1,self.n_s))
        self.cop = np.empty((1,2))
        self.cop_dat = np.empty((0,2))
        self.cal_mod = cal_mod
        self.BB_X = BB_X
        self.BB_Y = BB_Y
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号