Skip to content

Commit

Permalink
issue #17: frame: Update test data with P/F bit set.
Browse files Browse the repository at this point in the history
As observed in actual TNC firmware behaviour.
  • Loading branch information
sjlongland committed Apr 1, 2023
1 parent f657c04 commit 4197cbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions aioax25/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ class AX25SetAsyncBalancedModeFrame(AX25BaseUnnumberedFrame):
"""
MODIFIER = 0b00101111
CR = True
PF = True

AX25UnnumberedFrame.register(AX25SetAsyncBalancedModeFrame)

Expand All @@ -1037,6 +1038,7 @@ class AX25SetAsyncBalancedModeExtendedFrame(AX25BaseUnnumberedFrame):
"""
MODIFIER = 0b01101111
CR = True
PF = True

AX25UnnumberedFrame.register(AX25SetAsyncBalancedModeExtendedFrame)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_frame/test_uframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_decode_sabm():
from_hex(
'ac 96 68 84 ae 92 e0' # Destination
'ac 96 68 9a a6 98 61' # Source
'2f' # Control byte
'3f' # Control byte
)
)
assert isinstance(frame, AX25SetAsyncBalancedModeFrame), \
Expand All @@ -50,7 +50,7 @@ def test_decode_sabm_payload():
from_hex(
'ac 96 68 84 ae 92 e0' # Destination
'ac 96 68 9a a6 98 61' # Source
'2f' # Control byte
'3f' # Control byte
'11 22 33 44 55' # Payload
)
)
Expand All @@ -66,7 +66,7 @@ def test_decode_sabme():
from_hex(
'ac 96 68 84 ae 92 e0' # Destination
'ac 96 68 9a a6 98 61' # Source
'6f' # Control byte
'7f' # Control byte
)
)
assert isinstance(frame, AX25SetAsyncBalancedModeExtendedFrame), \
Expand Down

0 comments on commit 4197cbd

Please sign in to comment.