ProjectController.py 文件源码

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

项目:beremiz 作者: nucleron 项目源码 文件源码
def ReArmDebugRegisterTimer(self):
        if self.DebugTimer is not None:
            self.DebugTimer.cancel()

        # Prevent to call RegisterDebugVarToConnector when PLC is not started
        # If an output location var is forced it's leads to segmentation fault in runtime
        # Links between PLC located variables and real variables are not ready
        if self.IsPLCStarted():
            # Timer to prevent rapid-fire when registering many variables
            # use wx.CallAfter use keep using same thread. TODO : use wx.Timer instead
            self.DebugTimer = Timer(0.5, wx.CallAfter, args=[self.RegisterDebugVarToConnector])
            # Rearm anti-rapid-fire timer
            self.DebugTimer.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号