miniBtx-Handling verbessert, es werden nun Neuverbindungen (nach Disconnect) richtig erkannt
This commit is contained in:
parent
fb27299f51
commit
5cba18d5f0
@ -20,7 +20,7 @@ LOGLEVEL=logging.DEBUG
|
|||||||
|
|
||||||
## serial port settings:
|
## serial port settings:
|
||||||
#PORT="/dev/pts/5"
|
#PORT="/dev/pts/5"
|
||||||
PORT="/dev/ttyUSB3"
|
PORT="/dev/ttyUSB1"
|
||||||
BAUDRATE="1200"
|
BAUDRATE="1200"
|
||||||
# if the system is connected directly (null-modem): MODE=direct
|
# if the system is connected directly (null-modem): MODE=direct
|
||||||
# if the system is connected via a modem: MODE=modem
|
# if the system is connected via a modem: MODE=modem
|
||||||
|
13
rtx.py
13
rtx.py
@ -89,16 +89,23 @@ while True:
|
|||||||
rtxModem.init_modem()
|
rtxModem.init_modem()
|
||||||
rtxModem.wait_for_caller()
|
rtxModem.wait_for_caller()
|
||||||
rtxHelpers.send_welcome_page()
|
rtxHelpers.send_welcome_page()
|
||||||
elif glob.mode == "minibtx":
|
|
||||||
minibtx.wait_for_minibtx()
|
|
||||||
rtxHelpers.send_welcome_page()
|
|
||||||
|
|
||||||
# main loop to read data from client
|
# main loop to read data from client
|
||||||
while True:
|
while True:
|
||||||
in_byte = glob.ser.read(1)
|
in_byte = glob.ser.read(1)
|
||||||
|
|
||||||
|
if glob.mode == "minibtx":
|
||||||
|
if in_byte == b'\x01':
|
||||||
|
logging.info("miniBtx starts connection... waiting for connection...")
|
||||||
|
minibtx.wait_for_minibtx()
|
||||||
|
rtxHelpers.send_welcome_page()
|
||||||
|
break
|
||||||
|
|
||||||
rtxHelpers.process_byte(in_byte)
|
rtxHelpers.process_byte(in_byte)
|
||||||
|
|
||||||
if glob.mode == "modem":
|
if glob.mode == "modem":
|
||||||
if glob.ser.getCD() == False:
|
if glob.ser.getCD() == False:
|
||||||
|
logging.info("modem hangup.")
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user