mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-04-04 10:28:33 -04:00
Move ldpc temporary files into platform-independent location.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6991 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2abb9dbe2a
commit
ab8b6d0383
@ -52,14 +52,10 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg)
|
||||
|
||||
i=index(pchk_file,".pchk")
|
||||
gen_file=pchk_file(1:i-1)//".gen"
|
||||
i=index(ldpc_msg,'ldpc_msg')
|
||||
i=index(ldpc_msg,"ldpc_msg")
|
||||
ldpc_cw=ldpc_msg(1:i-1)//"ldpc_cw"
|
||||
fname1=trim(ldpc_msg)
|
||||
fname2=trim(ldpc_cw)
|
||||
! print*,'A ',fname1
|
||||
! fname1="ldpc_msg"
|
||||
! fname2="ldpc_cw"
|
||||
! print*,'B ',fname2
|
||||
|
||||
! call init_ldpc(trim(pchk_file)//char(0),trim(gen_file)//char(0))
|
||||
|
||||
@ -136,17 +132,20 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg)
|
||||
|
||||
! call ldpc_encode(msgbits,codeword)
|
||||
|
||||
open(19,file=fname1,status='unknown')
|
||||
write(19,1010) msgbits
|
||||
! print*,fname1
|
||||
! print*,fname2
|
||||
|
||||
open(24,file=fname1,status='unknown')
|
||||
write(24,1010) msgbits
|
||||
1010 format(80i1)
|
||||
close(19)
|
||||
cmnd='./encode '//trim(pchk_file)//' '//trim(gen_file)//' ' &
|
||||
//trim(fname1)//' '//trim(fname2)
|
||||
close(24)
|
||||
cmnd='encode "'//trim(pchk_file)//'" "'//trim(gen_file)//'" "' &
|
||||
//trim(fname1)//'" "'//trim(fname2)//'"'
|
||||
call system(cmnd)
|
||||
open(19,file=fname2,status='old')
|
||||
read(19,1020) codeword
|
||||
open(24,file=fname2,status='old')
|
||||
read(24,1020) codeword
|
||||
1020 format(128i1)
|
||||
close(19)
|
||||
close(24)
|
||||
|
||||
!Create 144-bit channel vector:
|
||||
!8-bit sync word + 48 bits + 8-bit sync word + 80 bits
|
||||
|
@ -65,17 +65,17 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype,pchk_file,fname1,fname2)
|
||||
enddo
|
||||
|
||||
! call ldpc_encode(message,codeword)
|
||||
open(19,file=fname1,status='unknown')
|
||||
write(19,1010) message
|
||||
open(24,file=fname1,status='unknown')
|
||||
write(24,1010) message
|
||||
1010 format(16i1)
|
||||
close(19)
|
||||
cmnd='./encode '//trim(pchk_file40)//' '//trim(gen_file40)//' ' &
|
||||
//trim(fname1)//' '//trim(fname2)
|
||||
close(24)
|
||||
cmnd='encode "'//trim(pchk_file40)//'" "'//trim(gen_file40)//'" "' &
|
||||
//trim(fname1)//'" "'//trim(fname2)//'"'
|
||||
call system(cmnd)
|
||||
open(19,file=fname2,status='unknown')
|
||||
read(19,1020) codeword
|
||||
open(24,file=fname2,status='old')
|
||||
read(24,1020) codeword
|
||||
1020 format(32i1)
|
||||
close(19)
|
||||
close(24)
|
||||
|
||||
cwstring=" "
|
||||
do i=1,32
|
||||
|
@ -838,7 +838,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
}
|
||||
|
||||
QString ldpcMsgFile = m_config.temp_dir().absoluteFilePath("ldpc_msg");
|
||||
ldpcMsgFile = '"' + ldpcMsgFile + '"';
|
||||
ba = ldpcMsgFile.toLocal8Bit();
|
||||
for(int i=0; i<512; i++) {
|
||||
m_ldpcMsgFile[i]=32;
|
||||
|
Loading…
Reference in New Issue
Block a user