Merged patch to fix #97

This commit is contained in:
Jordan Sherer 2019-03-21 21:14:23 -04:00
parent 9d9ae62526
commit 5ef440faf6
7 changed files with 9 additions and 9 deletions

View File

@ -15,7 +15,7 @@ subroutine extractmessage144(decoded,msgreceived,nhashflag,recent_calls,nrecent)
do ibyte=1,10
itmp=0
do ibit=1,8
itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*8+ibit))
itmp=ishft(itmp,1)+iand(1_1,decoded((ibyte-1)*8+ibit))
enddo
i1Dec8BitBytes(ibyte)=itmp
enddo
@ -31,7 +31,7 @@ subroutine extractmessage144(decoded,msgreceived,nhashflag,recent_calls,nrecent)
do ibyte=1,12
itmp=0
do ibit=1,6
itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*6+ibit))
itmp=ishft(itmp,1)+iand(1_1,decoded((ibyte-1)*6+ibit))
enddo
i4Dec6BitWords(ibyte)=itmp
enddo

View File

@ -13,7 +13,7 @@ subroutine chkcrc12a(decoded,nbadcrc)
read(cbits,1002) ncrc12 !Received CRC12
1002 format(75x,b12)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32,0_1))
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
icrc12=xor(icrc12, 42) ! TODO: jsherer - could change the crc here

View File

@ -19,7 +19,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag)
read(cbits,1002) ncrc12 !Received CRC12
1002 format(75x,b12)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32,0_1))
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
icrc12=xor(icrc12, 42) ! TODO: jsherer - could change the crc here
@ -29,7 +29,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag)
do ibyte=1,12
itmp=0
do ibit=1,6
itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*6+ibit))
itmp=ishft(itmp,1)+iand(1_1,decoded((ibyte-1)*6+ibit))
enddo
i4Dec6BitWords(ibyte)=itmp
enddo

View File

@ -35,7 +35,7 @@ subroutine genft8(msg,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
1000 format(12b6.6,b8.8)
read(cbits,1001) i1Msg8BitBytes(1:10)
1001 format(10b8)
i1Msg8BitBytes(10)=iand(i1Msg8BitBytes(10),128+64+32)
i1Msg8BitBytes(10)=iand(i1Msg8BitBytes(10),transfer(128+64+32,0_1))
i1Msg8BitBytes(11)=0
icrc12=crc12(c_loc(i1Msg8BitBytes),11)
icrc12=xor(icrc12, 42) ! TODO: jsherer - could change the crc here

View File

@ -94,7 +94,7 @@ allocate ( rxdata(N), llr(N) )
checksum = xor(checksum, 42) ! TODO: jsherer - could change the crc here
! For reference, the next 3 lines show how to check the CRC
i1Msg8BitBytes(10)=checksum/256
i1Msg8BitBytes(11)=iand (checksum,255)
i1Msg8BitBytes(11)=iand(checksum,transfer(255,0_2))
checksumok = crc12_check(c_loc (i1Msg8BitBytes), 11)
if( checksumok ) write(*,*) 'Good checksum'

View File

@ -95,7 +95,7 @@ do idb = 0, 30
nhashflag=0
imsg=0
do i=1,16
imsg=ishft(imsg,1)+iand(1,decoded(17-i))
imsg=ishft(imsg,1)+iand(1_1,decoded(17-i))
enddo
nrxrpt=iand(imsg,15)
nrxhash=(imsg-nrxrpt)/16

View File

@ -129,7 +129,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, &
imsg=0
do i=1,16
imsg=ishft(imsg,1)+iand(1,decoded(17-i))
imsg=ishft(imsg,1)+iand(1_1,decoded(17-i))
enddo
nrxrpt=iand(imsg,15)
nrxhash=(imsg-nrxrpt)/16