ensure serial settings (weird bug)
This commit is contained in:
parent
24413dce2d
commit
cd543b92bd
4
mitm.rb
4
mitm.rb
|
@ -7,6 +7,10 @@ require './telegram'
|
|||
pc_serial = SerialPort.open("/dev/ttyUSB0",{ baud: 57600, databits: 8, parity: SerialPort::ODD, stop_bit: 1, flow_control: SerialPort::NONE})
|
||||
ps_serial = SerialPort.open("/dev/ttyACM0",{ baud: 115200, databits: 8, parity: SerialPort::ODD, stop_bit: 1, flow_control: SerialPort::NONE})
|
||||
|
||||
# ensure serial settings (weird bug)
|
||||
pc_serial.baud = 57600
|
||||
pc_serial.parity = SerialPort::ODD
|
||||
|
||||
while true
|
||||
activities = IO.select([pc_serial,ps_serial])
|
||||
activities[0].each do |activity|
|
||||
|
|
Loading…
Reference in New Issue