Fixed #54: heartbeat anywhere should be exposed in the configuration and HB ack should abide by that setting
This commit is contained in:
		
							parent
							
								
									17416144a8
								
							
						
					
					
						commit
						5ca582a6b4
					
				@ -388,6 +388,13 @@
 | 
			
		||||
                    </property>
 | 
			
		||||
                   </widget>
 | 
			
		||||
                  </item>
 | 
			
		||||
                  <item>
 | 
			
		||||
                  <widget class="QCheckBox" name="heartbeat_anywhere_check_box">
 | 
			
		||||
                   <property name="text">
 | 
			
		||||
                    <string>Allow heartbeat transmissions outside of heartbeat sub-channel (500Hz - 1000Hz)</string>
 | 
			
		||||
                   </property>
 | 
			
		||||
                  </widget>
 | 
			
		||||
                  </item>
 | 
			
		||||
                  <item>
 | 
			
		||||
                   <layout class="QHBoxLayout" name="horizontalLayout_9">
 | 
			
		||||
                    <item>
 | 
			
		||||
@ -690,15 +697,6 @@ text message.</string>
 | 
			
		||||
                 <property name="title">
 | 
			
		||||
                  <string>Heartbeat (HB)</string>
 | 
			
		||||
                 </property>
 | 
			
		||||
                 <layout class="QVBoxLayout" name="verticalLayout_211">
 | 
			
		||||
                  <item>
 | 
			
		||||
                   <widget class="QCheckBox" name="heartbeat_anywhere_check_box">
 | 
			
		||||
                    <property name="text">
 | 
			
		||||
                     <string>Allow heartbeat transmissions outside of heartbeat sub-channel (500Hz - 1000Hz)</string>
 | 
			
		||||
                    </property>
 | 
			
		||||
                   </widget>
 | 
			
		||||
                  </item>
 | 
			
		||||
                 </layout>
 | 
			
		||||
                </widget>
 | 
			
		||||
               </item>
 | 
			
		||||
               <item>
 | 
			
		||||
 | 
			
		||||
@ -6822,6 +6822,14 @@ void MainWindow::sendHeartbeat(){
 | 
			
		||||
    enqueueMessage(PriorityLow, message, f, [this](){ /* */ });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::sendHeartbeatAck(QString to, int snr){
 | 
			
		||||
    auto message = QString("%1 ACK %2").arg(to).arg(Varicode::formatSNR(snr));
 | 
			
		||||
 | 
			
		||||
    auto f = m_config.heartbeat_anywhere() ? -1 : findFreeFreqOffset(500, 1000, 50);
 | 
			
		||||
 | 
			
		||||
    enqueueMessage(PriorityLow, message, f, [this](){ /* */ });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::on_hbMacroButton_toggled(bool checked){
 | 
			
		||||
    if(checked){
 | 
			
		||||
        if(m_hbInterval){
 | 
			
		||||
@ -9538,12 +9546,15 @@ void MainWindow::processCommandActivity() {
 | 
			
		||||
        // PROCESS ACTIVE HEARTBEAT
 | 
			
		||||
        // if we have auto reply enabled and we are heartbeating and selcall is not enabled
 | 
			
		||||
        else if (d.cmd == " HB" && ui->autoReplyButton->isChecked() && ui->hbMacroButton->isChecked() && m_hbInterval > 0 && !ui->selcalButton->isChecked()){
 | 
			
		||||
            reply = QString("%1 ACK %2").arg(d.from).arg(Varicode::formatSNR(d.snr));
 | 
			
		||||
            sendHeartbeatAck(d.from, d.snr);
 | 
			
		||||
 | 
			
		||||
            if(isAllCall){
 | 
			
		||||
                // since all pings are technically @ALLCALL, let's bump the allcall cache here...
 | 
			
		||||
                m_txAllcallCommandCache.insert(d.from, new QDateTime(now), 5);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // make sure this is explicit
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // PROCESS BUFFERED QUERY
 | 
			
		||||
 | 
			
		||||
@ -280,6 +280,7 @@ private slots:
 | 
			
		||||
  void buildCQMenu(QMenu *menu);
 | 
			
		||||
  void buildRepeatMenu(QMenu *menu, QPushButton * button, int * interval);
 | 
			
		||||
  void sendHeartbeat();
 | 
			
		||||
  void sendHeartbeatAck(QString to, int snr);
 | 
			
		||||
  void on_hbMacroButton_toggled(bool checked);
 | 
			
		||||
  void on_hbMacroButton_clicked();
 | 
			
		||||
  void sendCQ(bool repeat=false);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user