mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-29 04:42:28 -04:00
1. Generate shorthand JT65 messages for RO, RRR, 73.
2. Fix background colors for special message types. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6556 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
5a33f2a146
commit
33581198e6
@ -8,7 +8,7 @@ subroutine gen65(msg0,ichk,msgsent,itone,itype)
|
||||
character*22 message !Message to be generated
|
||||
character*22 msgsent !Message as it will be received
|
||||
integer itone(126)
|
||||
! character*3 cok !' ' or 'OOO'
|
||||
character*3 cok !' ' or 'OOO'
|
||||
integer dgen(13)
|
||||
integer sent(63)
|
||||
integer nprc(126)
|
||||
@ -40,8 +40,7 @@ subroutine gen65(msg0,ichk,msgsent,itone,itype)
|
||||
message=message(i+1:)
|
||||
enddo
|
||||
|
||||
nspecial=0
|
||||
! call chkmsg(message,cok,nspecial,flip)
|
||||
call chkmsg(message,cok,nspecial,flip)
|
||||
if(nspecial.eq.0) then
|
||||
call packmsg(message,dgen,itype) !Pack message into 72 bits
|
||||
call unpackmsg(dgen,msgsent) !Unpack to get message sent
|
||||
@ -51,10 +50,6 @@ subroutine gen65(msg0,ichk,msgsent,itone,itype)
|
||||
call interleave63(sent,1) !Apply interleaving
|
||||
call graycode65(sent,63,1) !Apply Gray code
|
||||
nsym=126 !Symbols per transmission
|
||||
else
|
||||
nsym=32
|
||||
endif
|
||||
|
||||
k=0
|
||||
do j=1,nsym
|
||||
if(nprc(j).eq.0) then
|
||||
@ -64,6 +59,20 @@ subroutine gen65(msg0,ichk,msgsent,itone,itype)
|
||||
itone(j)=0
|
||||
endif
|
||||
enddo
|
||||
else
|
||||
nsym=32
|
||||
k=0
|
||||
do j=1,nsym
|
||||
do n=1,4
|
||||
k=k+1
|
||||
if(iand(j,1).eq.1) itone(k)=0
|
||||
if(iand(j,1).eq.0) itone(k)=10*nspecial
|
||||
if(k.eq.126) go to 10
|
||||
enddo
|
||||
enddo
|
||||
10 msgsent=message
|
||||
itype=7
|
||||
endif
|
||||
endif
|
||||
|
||||
999 return
|
||||
|
@ -2588,9 +2588,9 @@ void MainWindow::guiUpdate()
|
||||
sprintf(s,"Tx: %s",msgsent);
|
||||
nsendingsh=0;
|
||||
if(s[4]==64) nsendingsh=1;
|
||||
if(nsendingsh==1) {
|
||||
if(nsendingsh==1 or m_currentMessageType==7) {
|
||||
tx_status_label->setStyleSheet("QLabel{background-color: #66ffff}");
|
||||
} else if(nsendingsh==-1) {
|
||||
} else if(nsendingsh==-1 or m_currentMessageType==6) {
|
||||
tx_status_label->setStyleSheet("QLabel{background-color: #ffccff}");
|
||||
} else {
|
||||
tx_status_label->setStyleSheet("QLabel{background-color: #ffff33}");
|
||||
@ -3349,10 +3349,13 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
||||
QByteArray s=t.toUpper().toLocal8Bit();
|
||||
ba2msg(s,message);
|
||||
int ichk=1,itype=0;
|
||||
gen9_(message,&ichk,msgsent,const_cast<int *>(itone),&itype,len1,len1);
|
||||
// gen9_(message,&ichk,msgsent,const_cast<int *>(itone),&itype,len1,len1);
|
||||
gen65_(message,&ichk,msgsent,const_cast<int *>(itone),&itype,len1,len1);
|
||||
msgsent[22]=0;
|
||||
bool text=false;
|
||||
bool short65=false;
|
||||
if(itype==6) text=true;
|
||||
if(itype==7) short65=true;
|
||||
if(m_mode=="JTMSK" and t.mid(0,1)=="<") text=false;
|
||||
QString t1;
|
||||
t1.fromLatin1(msgsent);
|
||||
@ -3360,10 +3363,14 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
||||
QPalette p(tx->palette());
|
||||
if(text) {
|
||||
p.setColor(QPalette::Base,"#ffccff");
|
||||
} else {
|
||||
if(short65) {
|
||||
p.setColor(QPalette::Base,"#66ffff");
|
||||
} else {
|
||||
p.setColor(QPalette::Base,Qt::white);
|
||||
if(m_mode=="JTMSK" and t.mid(0,1)=="<") p.setColor(QPalette::Base,"#00ffff");
|
||||
}
|
||||
}
|
||||
tx->setPalette(p);
|
||||
int len=t.length();
|
||||
auto pos = tx->cursorPosition ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user