mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-27 11:00:32 -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,19 +50,29 @@ 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 | ||||
|         k=0 | ||||
|         do j=1,nsym | ||||
|            if(nprc(j).eq.0) then | ||||
|               k=k+1 | ||||
|               itone(j)=sent(k)+2 | ||||
|            else | ||||
|               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 | ||||
| 
 | ||||
|      k=0 | ||||
|      do j=1,nsym | ||||
|         if(nprc(j).eq.0) then | ||||
|            k=k+1 | ||||
|            itone(j)=sent(k)+2 | ||||
|         else | ||||
|            itone(j)=0 | ||||
|         endif | ||||
|      enddo | ||||
|   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); | ||||
| @ -3361,8 +3364,12 @@ void MainWindow::msgtype(QString t, QLineEdit* tx)               //msgtype() | ||||
|   if(text) { | ||||
|     p.setColor(QPalette::Base,"#ffccff"); | ||||
|   } else { | ||||
|     p.setColor(QPalette::Base,Qt::white); | ||||
|     if(m_mode=="JTMSK" and t.mid(0,1)=="<") p.setColor(QPalette::Base,"#00ffff"); | ||||
|     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(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user