mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge pull request #184 from DJ2LS/issue-173-patch2
This commit is contained in:
commit
f2ef3f7ea2
1 changed files with 4 additions and 2 deletions
|
@ -1140,7 +1140,8 @@ class DATA():
|
|||
Returns:
|
||||
"""
|
||||
# Close the session if the DXCALLSIGN_CRC matches the station in static.
|
||||
if helpers.check_callsign(static.DXCALLSIGN, bytes(data_in[4:7])):
|
||||
_valid_crc, _ = helpers.check_callsign(static.DXCALLSIGN, bytes(data_in[4:7]))
|
||||
if _valid_crc:
|
||||
static.ARQ_SESSION_STATE = 'disconnected'
|
||||
helpers.add_to_heard_stations(static.DXCALLSIGN,static.DXGRID, 'DATA-CHANNEL', static.SNR, static.FREQ_OFFSET, static.HAMLIB_FREQUENCY)
|
||||
structlog.get_logger("structlog").info("SESSION [" + str(self.mycallsign, 'utf-8') + "]<<X>>[" + str(static.DXCALLSIGN, 'utf-8') + "]", state=static.ARQ_SESSION_STATE)
|
||||
|
@ -1187,7 +1188,8 @@ class DATA():
|
|||
"""
|
||||
|
||||
# Accept session data if the DXCALLSIGN_CRC matches the station in static.
|
||||
if helpers.check_callsign(static.DXCALLSIGN, bytes(data_in[4:7])):
|
||||
_valid_crc, _ = helpers.check_callsign(static.DXCALLSIGN, bytes(data_in[4:7]))
|
||||
if _valid_crc:
|
||||
structlog.get_logger("structlog").debug("received session heartbeat")
|
||||
helpers.add_to_heard_stations(static.DXCALLSIGN, static.DXGRID, 'SESSION-HB', static.SNR, static.FREQ_OFFSET, static.HAMLIB_FREQUENCY)
|
||||
|
||||
|
|
Loading…
Reference in a new issue