コード例 #1
0
ファイル: serial_bus.py プロジェクト: dhylands/bioloid3
 def __init__(self, port, baud=1000000, show_packets=False):
     Bus.__init__(self, show_packets)
     self.serial_port = serial.Serial(port=port,
                                      baudrate=baud,
                                      timeout=0.1,
                                      bytesize=serial.EIGHTBITS,
                                      parity=serial.PARITY_NONE,
                                      stopbits=serial.STOPBITS_ONE,
                                      xonxoff=False,
                                      rtscts=False,
                                      dsrdtr=False)
コード例 #2
0
 def __init__(self, port, baud=1000000, show=SHOW_NONE):
     Bus.__init__(self, show)
     self.serial_port = serial.Serial(port=port,
                                      baudrate=baud,
                                      timeout=0.1,
                                      bytesize=serial.EIGHTBITS,
                                      parity=serial.PARITY_NONE,
                                      stopbits=serial.STOPBITS_ONE,
                                      xonxoff=False,
                                      rtscts=False,
                                      dsrdtr=False)
コード例 #3
0
 def __init__(self, bus_id, bus_type, init_stop, controller):
     Bus.__init__(self, bus_id, bus_type, init_stop, controller)
     # tunable parameters
     self.exploration_probability = 0
     self.movement_policy_switch_time = MainBus._DEFAULT_MOVEMENT_SWITCH_TIME
     self.initial_buses = MainBus._DEFAULT_INITIAL_BUS_COUNT
コード例 #4
0
 def __init__(self, make_in, model_in, year_in, riders_in):
     Bus.__init__(self, make_in, model_in, year_in, riders_in)
     self.color = "Yellow"
コード例 #5
0
ファイル: taxi.py プロジェクト: hackettccp/CIS106
 def __init__(self, make_in, model_in, year_in, riders_in, doors_in):
     Bus.__init__(self, make_in, model_in, year_in, riders_in)
     Car.__init__(self, make_in, model_in, year_in, doors_in)
     self.meter = 5.0