diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /lib/ft8/chkcrc13a.f90 | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'lib/ft8/chkcrc13a.f90')
| -rwxr-xr-x | lib/ft8/chkcrc13a.f90 | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/ft8/chkcrc13a.f90 b/lib/ft8/chkcrc13a.f90 index 25e14584..e35a92a1 100755 --- a/lib/ft8/chkcrc13a.f90 +++ b/lib/ft8/chkcrc13a.f90 @@ -1,24 +1,24 @@ -subroutine chkcrc13a(decoded,nbadcrc) - - use crc - integer*1 decoded(90) - integer*1, target:: i1Dec8BitBytes(12) - character*90 cbits - -! Write decoded bits into cbits: 77-bit message plus 13-bit CRC - write(cbits,1000) decoded -1000 format(90i1) - read(cbits,1001) i1Dec8BitBytes -1001 format(12b8) - read(cbits,1002) ncrc13 !Received CRC13 -1002 format(77x,b13) - - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) - i1Dec8BitBytes(11:12)=0 - icrc13=crc13(c_loc(i1Dec8BitBytes),12) !CRC13 computed from 77 msg bits - - nbadcrc=1 - if(ncrc13.eq.icrc13) nbadcrc=0 - - return -end subroutine chkcrc13a +subroutine chkcrc13a(decoded,nbadcrc)
+
+ use crc
+ integer*1 decoded(90)
+ integer*1, target:: i1Dec8BitBytes(12)
+ character*90 cbits
+
+! Write decoded bits into cbits: 77-bit message plus 13-bit CRC
+ write(cbits,1000) decoded
+1000 format(90i1)
+ read(cbits,1001) i1Dec8BitBytes
+1001 format(12b8)
+ read(cbits,1002) ncrc13 !Received CRC13
+1002 format(77x,b13)
+
+ i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1))
+ i1Dec8BitBytes(11:12)=0
+ icrc13=crc13(c_loc(i1Dec8BitBytes),12) !CRC13 computed from 77 msg bits
+
+ nbadcrc=1
+ if(ncrc13.eq.icrc13) nbadcrc=0
+
+ return
+end subroutine chkcrc13a
|
