mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Remove dependence on static FRAME_TYPE enum.
This commit is contained in:
parent
2481102fa2
commit
1071ef58e1
2 changed files with 5 additions and 7 deletions
|
@ -93,9 +93,7 @@ def t_highsnr_arq_short_station1(
|
||||||
# log.info("S1 TX: ", frames=t_frames)
|
# log.info("S1 TX: ", frames=t_frames)
|
||||||
for item in t_frames:
|
for item in t_frames:
|
||||||
frametype = int.from_bytes(item[:1], "big")
|
frametype = int.from_bytes(item[:1], "big")
|
||||||
log.info(
|
log.info("S1 TX: ", TX=frametype)
|
||||||
"S1 TX: ", TX=static.FRAME_TYPE(frametype).name, frametypeno=frametype
|
|
||||||
)
|
|
||||||
|
|
||||||
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
||||||
# original function captured before this one was put in place.
|
# original function captured before this one was put in place.
|
||||||
|
@ -112,7 +110,7 @@ def t_highsnr_arq_short_station1(
|
||||||
bytes_per_frame=bytes_per_frame,
|
bytes_per_frame=bytes_per_frame,
|
||||||
)
|
)
|
||||||
frametype = int.from_bytes(t_bytes_out[:1], "big")
|
frametype = int.from_bytes(t_bytes_out[:1], "big")
|
||||||
log.info("S1 RX: ", RX=static.FRAME_TYPE(frametype).name, frametypeno=frametype)
|
log.info("S1 RX: ", RX=frametype)
|
||||||
|
|
||||||
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
||||||
# original function captured before this one was put in place.
|
# original function captured before this one was put in place.
|
||||||
|
@ -127,7 +125,7 @@ def t_highsnr_arq_short_station1(
|
||||||
|
|
||||||
# Construct message to dxstation.
|
# Construct message to dxstation.
|
||||||
# Tests seem to work better when this side sends a 'dummy' frame first.
|
# Tests seem to work better when this side sends a 'dummy' frame first.
|
||||||
data = {"type": "ping", "command": "ping", "dxcallsign": 'BB4NN'}
|
data = {"type": "ping", "command": "ping", "dxcallsign": "BB4NN"}
|
||||||
sock.process_tnc_commands(json.dumps(data, indent=None))
|
sock.process_tnc_commands(json.dumps(data, indent=None))
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ def t_highsnr_arq_short_station2(
|
||||||
# log.info("S2 TX: ", frames=t_frames)
|
# log.info("S2 TX: ", frames=t_frames)
|
||||||
for item in t_frames:
|
for item in t_frames:
|
||||||
frametype = int.from_bytes(item[:1], "big")
|
frametype = int.from_bytes(item[:1], "big")
|
||||||
log.info("S2 TX: ", TX=static.FRAME_TYPE(frametype).name, frametypeno=frametype)
|
log.info("S2 TX: ", TX=frametype)
|
||||||
|
|
||||||
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
||||||
# original function captured before this one was put in place.
|
# original function captured before this one was put in place.
|
||||||
|
@ -116,7 +116,7 @@ def t_highsnr_arq_short_station2(
|
||||||
bytes_per_frame=bytes_per_frame,
|
bytes_per_frame=bytes_per_frame,
|
||||||
)
|
)
|
||||||
frametype = int.from_bytes(t_bytes_out[:1], "big")
|
frametype = int.from_bytes(t_bytes_out[:1], "big")
|
||||||
log.info("S2 RX: ", RX=static.FRAME_TYPE(frametype).name, frametypeno=frametype)
|
log.info("S2 RX: ", RX=frametype)
|
||||||
|
|
||||||
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
# Apologies for the Python "magic." "orig_func" is a pointer to the
|
||||||
# original function captured before this one was put in place.
|
# original function captured before this one was put in place.
|
||||||
|
|
Loading…
Reference in a new issue