示例#1
0
文件: lax.py 项目: noguxun/misc
    def pre_cmd_act(self):
        # reset the port if last command is more than 10 seconds ago
        #  device could be rebooted
        now = time.time()
        if int(now - self.last_cmd_time) > 10:
            result = laxcmd.reset_port()
            print("Reset the port");

        self.last_cmd_time = now
示例#2
0
    def pre_cmd_act(self):
        # reset the port if last command is more than 10 seconds ago
        #  device could be rebooted
        now = time.time()
        if int(now - self.last_cmd_time) > 10:
            result = laxcmd.reset_port()
            print("Reset the port")

        self.last_cmd_time = now
示例#3
0
 def act_reset(self):
     self.log_clear()
     print("Resetting Port ....")
     result = laxcmd.reset_port()
     print("Resetting Done!")
     self.log("port reset" + " " + self.error_msg(result))
示例#4
0
文件: lax.py 项目: noguxun/misc
 def act_reset(self):
     self.log_clear()
     print("Resetting Port ....")
     result = laxcmd.reset_port()
     print("Resetting Done!")
     self.log("port reset" + " " + self.error_msg(result) )