Example #1
0
 def __init__(self, reactor, serialport, baud, canbus_iface, canbus_nodeid):
     self.serialport = serialport
     self.baud = baud
     self.canbus_iface = canbus_iface
     self.canbus_nodeid = canbus_nodeid
     self.ser = serialhdl.SerialReader(reactor)
     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 = pins.PinResolver(validate_aliases=False)
     self.data = ""
     reactor.register_fd(self.fd, self.process_kbd)
     reactor.register_callback(self.connect)
     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 = {}
Example #2
0
 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 = {}
Example #3
0
 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)
     reactor.register_callback(self.connect)
     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 = {}
Example #4
0
 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 _setup_async_callbacks(self):
     self._pipe_fds = os.pipe()
     util.set_nonblock(self._pipe_fds[0])
     util.set_nonblock(self._pipe_fds[1])
     self.register_fd(self._pipe_fds[0], self._got_pipe_signal)
Example #6
0
 def init_drawing(self, *args):
     self.ids.console_input.bind(on_text_validate=self.confirm)
     set_nonblock(self.app.fd)
Example #7
0
 def _setup_async_callbacks(self):
     self._pipe_fds = os.pipe()
     util.set_nonblock(self._pipe_fds[0])
     util.set_nonblock(self._pipe_fds[1])
     self.register_fd(self._pipe_fds[0], self._got_pipe_signal)