From 4197cbde59032816f94211469a7dd33f433c9f3b Mon Sep 17 00:00:00 2001 From: Stuart Longland Date: Sat, 1 Apr 2023 19:47:27 +1000 Subject: [PATCH] issue #17: frame: Update test data with P/F bit set. As observed in actual TNC firmware behaviour. --- aioax25/frame.py | 2 ++ tests/test_frame/test_uframe.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aioax25/frame.py b/aioax25/frame.py index 81cacab..7b8a9eb 100644 --- a/aioax25/frame.py +++ b/aioax25/frame.py @@ -1024,6 +1024,7 @@ class AX25SetAsyncBalancedModeFrame(AX25BaseUnnumberedFrame): """ MODIFIER = 0b00101111 CR = True + PF = True AX25UnnumberedFrame.register(AX25SetAsyncBalancedModeFrame) @@ -1037,6 +1038,7 @@ class AX25SetAsyncBalancedModeExtendedFrame(AX25BaseUnnumberedFrame): """ MODIFIER = 0b01101111 CR = True + PF = True AX25UnnumberedFrame.register(AX25SetAsyncBalancedModeExtendedFrame) diff --git a/tests/test_frame/test_uframe.py b/tests/test_frame/test_uframe.py index 42e5172..23675a0 100644 --- a/tests/test_frame/test_uframe.py +++ b/tests/test_frame/test_uframe.py @@ -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), \ @@ -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 ) ) @@ -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), \