mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	Fix issues with type 2 compound calls in contest mode
Message generation in contest mode now generates the correct Tx3 for type 2 calls. "<type-2> 73" is a free text so needed special handling in message processing. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8064 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									51d50ecf78
								
							
						
					
					
						commit
						f4903ae1bd
					
				@ -2,6 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <QStringList>
 | 
					#include <QStringList>
 | 
				
			||||||
#include <QRegularExpression>
 | 
					#include <QRegularExpression>
 | 
				
			||||||
 | 
					#include <QDebug>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
  bool stdmsg_(char const * msg, bool contest_mode, char const * mygrid, int len_msg, int len_grid);
 | 
					  bool stdmsg_(char const * msg, bool contest_mode, char const * mygrid, int len_msg, int len_grid);
 | 
				
			||||||
@ -60,7 +61,11 @@ QStringList DecodedText::messageWords () const
 | 
				
			|||||||
      // extract up to the first four message words
 | 
					      // extract up to the first four message words
 | 
				
			||||||
      return words_re.match (message_).capturedTexts ();
 | 
					      return words_re.match (message_).capturedTexts ();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  return message_.split (' ');  // simple word split for free text messages
 | 
					  // simple word split for free text messages
 | 
				
			||||||
 | 
					  auto words = message_.split (' ', QString::SkipEmptyParts);
 | 
				
			||||||
 | 
					  // add whole message as item 0 to mimic RE capture list
 | 
				
			||||||
 | 
					  words.prepend (message_);
 | 
				
			||||||
 | 
					  return words;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString DecodedText::CQersCall() const
 | 
					QString DecodedText::CQersCall() const
 | 
				
			||||||
 | 
				
			|||||||
@ -4091,14 +4091,18 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
 | 
				
			|||||||
      switch (m_config.type_2_msg_gen ())
 | 
					      switch (m_config.type_2_msg_gen ())
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
        case Configuration::type_2_msg_1_full:
 | 
					        case Configuration::type_2_msg_1_full:
 | 
				
			||||||
          t="DE " + my_callsign + " " + my_grid;
 | 
					          t="DE " + my_callsign + " ";
 | 
				
			||||||
          msgtype(t, ui->tx1);
 | 
					          msgtype(t + my_grid, ui->tx1);
 | 
				
			||||||
          if (!eme_short_codes) {
 | 
					          if (!eme_short_codes) {
 | 
				
			||||||
            t=t0 + "R" + rpt;
 | 
					            if ((m_mode=="MSK144" || m_mode=="FT8")
 | 
				
			||||||
            msgtype(t, ui->tx3);
 | 
					                && m_config.contestMode()) {
 | 
				
			||||||
 | 
					              msgtype(t + "R " + my_grid, ui->tx3);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else {
 | 
				
			||||||
 | 
					              msgtype(t + "R" + rpt, ui->tx3);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            if ((m_mode != "JT4" && m_mode != "QRA64") || !m_bShMsgs) {
 | 
					            if ((m_mode != "JT4" && m_mode != "QRA64") || !m_bShMsgs) {
 | 
				
			||||||
              t="DE " + my_callsign + " 73";
 | 
					              msgtype(t + "73", ui->tx5->lineEdit ());
 | 
				
			||||||
              msgtype(t, ui->tx5->lineEdit ());
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user