def _activate_command(self, cmd):
"""Use the shared `threading.Event` instance to signal a mini
fulfillment shadow command to the running Control thread.
"""
self.last_state = self.active_state
self.active_state = cmd
log.info("[arm._activate_command] last_state='{0}' state='{1}'".format(
self.last_state, cmd))
if self.active_state == 'run':
log.info("[arm._activate_command] START RUN")
self.cmd_event.set()
elif self.active_state == 'stop':
log.info("[arm._activate_command] STOP")
self.cmd_event.clear()
return
评论列表
文章目录