mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
respond to CQ and PING if not in ARQ session
This commit is contained in:
parent
363b90da07
commit
b0c0940e5d
|
@ -9,7 +9,8 @@ class CQFrameHandler(frame_handler_ping.PingFrameHandler):
|
|||
|
||||
def should_respond(self):
|
||||
self.logger.debug(f"Respond to CQ: {self.config['MODEM']['respond_to_cq']}")
|
||||
return self.config['MODEM']['respond_to_cq']
|
||||
return bool(self.config['MODEM']['respond_to_cq'] and not self.states.getARQ())
|
||||
|
||||
|
||||
def send_ack(self):
|
||||
factory = data_frame_factory.DataFrameFactory(self.config)
|
||||
|
|
|
@ -16,12 +16,8 @@ class PingFrameHandler(frame_handler.FrameHandler):
|
|||
# self.logger.info(f"[Modem] {ft} received but not for us.")
|
||||
# return valid
|
||||
|
||||
#def should_respond(self):
|
||||
# return self.is_frame_for_me()
|
||||
|
||||
def follow_protocol(self):
|
||||
|
||||
if not self.should_respond():
|
||||
if not bool(self.is_frame_for_me() and not self.states.getARQ()):
|
||||
return
|
||||
|
||||
self.logger.debug(
|
||||
|
|
Loading…
Reference in a new issue