From 6cd932fadae3f3c797531a6e088b9046a51ae0e7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 11 Apr 2013 20:59:17 +0000 Subject: [PATCH] Correct the logic for Runaway Tx Watchdog. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3157 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 15 +++++++++------ mainwindow.h | 1 + wsjtx.iss | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index a5b4128e1..acbf49956 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -174,6 +174,7 @@ MainWindow::MainWindow(QWidget *parent) : m_freeText=false; m_msErase=0; m_sent73=false; + m_watchdogLimit=5; decodeBusy(false); ui->xThermo->setFillBrush(Qt::green); @@ -1484,16 +1485,11 @@ void MainWindow::guiUpdate() QString t=QString::fromAscii(msgsent); if(t==m_msgSent0) { m_repeatMsg++; - if(m_runaway and m_repeatMsg>0) { - on_stopTxButton_clicked(); - msgBox0.setText("Runaway Tx watchdog"); - msgBox0.show(); - m_repeatMsg=0; - } } else { m_repeatMsg=0; m_msgSent0=t; } + ui->xThermo->setValue(0.0); //Set Thermo to zero m_monitoring=false; soundInThread.setMonitoring(false); @@ -1640,6 +1636,13 @@ void MainWindow::stopTx2() ptt(m_pttPort,0,&m_iptt,&m_COMportOpen); } if(m_73TxDisable and m_sent73) on_stopTxButton_clicked(); + + if(m_runaway and m_repeatMsg>m_watchdogLimit) { + on_stopTxButton_clicked(); + msgBox0.setText("Runaway Tx watchdog"); + msgBox0.show(); + m_repeatMsg=0; + } } void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg() diff --git a/mainwindow.h b/mainwindow.h index 7215d445c..39558b893 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -200,6 +200,7 @@ private: qint32 m_iptt; qint32 m_band; qint32 m_repeatMsg; + qint32 m_watchdogLimit; bool m_monitoring; bool m_transmitting; diff --git a/wsjtx.iss b/wsjtx.iss index 4190e2435..db9ba2d72 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,6 +1,6 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 0.9 r3155 +AppVerName=wsjtx Version 0.9 r3157 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx DefaultGroupName=wsjtx