def __init__(self, ser, reactor): self.ser = ser self.reactor = reactor self.fd = sys.stdin.fileno() util.set_nonblock(self.fd) self.pins = None self.data = "" reactor.register_fd(self.fd, self.process_kbd) self.connect_timer = reactor.register_timer(self.connect, reactor.NOW) self.local_commands = {"PINS": self.set_pin_map, "SET": self.set_var} self.eval_globals = {}
def __init__(self, ser, reactor): self.ser = ser self.reactor = reactor self.start_time = reactor.monotonic() self.clocksync = clocksync.ClockSync(self.reactor) self.fd = sys.stdin.fileno() util.set_nonblock(self.fd) self.mcu_freq = 0 self.pins = None self.data = "" reactor.register_fd(self.fd, self.process_kbd) self.connect_timer = reactor.register_timer(self.connect, reactor.NOW) self.local_commands = { "PINS": self.command_PINS, "SET": self.command_SET, "DELAY": self.command_DELAY, "FLOOD": self.command_FLOOD, "SUPPRESS": self.command_SUPPRESS, "STATS": self.command_STATS, "LIST": self.command_LIST, "HELP": self.command_HELP, } self.eval_globals = {}
def __init__(self, ser, reactor): self.ser = ser self.reactor = reactor self.fd = sys.stdin.fileno() util.set_nonblock(self.fd) self.mcu_freq = 0 self.pins = None self.data = "" reactor.register_fd(self.fd, self.process_kbd) self.connect_timer = reactor.register_timer(self.connect, reactor.NOW) self.local_commands = { "PINS": self.command_PINS, "SET": self.command_SET, "DELAY": self.command_DELAY, "FLOOD": self.command_FLOOD, "SUPPRESS": self.command_SUPPRESS, "STATS": self.command_STATS, "LIST": self.command_LIST, "HELP": self.command_HELP, } self.eval_globals = {}