scope.py 文件源码

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

项目:pypilot 作者: pypilot 项目源码 文件源码
def tracevertexes(self, time, plot, gldrawtype):
        # remove datapoints after the first one that is off the screen
        for i in range(len(self.points)):
            if self.points[i][0] < time - plot.disptime:
                self.points = self.points[:i+1]
                break

        glBegin(gldrawtype)
        for point in self.points:
            if math.isnan(point[1]):
                glEnd()
                glBegin(gldrawtype)
            else:
                y = point[1] - self.offset
                if self.directional:
                    if y >= 180:
                        y -= 360
                    elif y < - 180:
                        y += 360
                glVertex2d(point[0]-time, y)
        glEnd()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号