Ejemplo n.º 1
0
    def _updateControlWord(self, force):
        """Updates the data in the control word cache. Updates if the force parameter is set, or if
        50ms have passed since the last update.

        :param force: True to force an update to the cache, otherwise update if 50ms have passed.
        """
        now = hal.getFPGATime()
        with self.controlWordMutex:
            if now - self.lastControlWordUpdate > 50 or force:
                hal.getControlWord(self.controlWordCache)
                self.lastControlWordUpdate = now
 def _updateControlWord(self, force):
     """Updates the data in the control word cache. Updates if the force parameter is set, or if
     50ms have passed since the last update.
     
     :param force: True to force an update to the cache, otherwise update if 50ms have passed.
     """
     now = hal.getFPGATime()
     with self.controlWordMutex:
         if now - self.lastControlWordUpdate > 50 or force:
             hal.getControlWord(self.controlWordCache)
             self.lastControlWordUpdate = now