summaryrefslogtreecommitdiff
path: root/widgets/plotter.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2019-04-29 22:12:59 +0200
committerChristoph Berg <myon@debian.org>2019-04-29 22:12:59 +0200
commit70daed33540f3e59a0b1ade23054227162bb94b5 (patch)
treed7b37965eb45dcee3d6779dfe4c89765a413ee9a /widgets/plotter.cpp
parent3f82cbb91d23747acad17055a738fa6aa9f0d30b (diff)
parentb7238399ea4f1ca51d8f7b8f9220af3da0913edf (diff)
Update upstream source from tag 'upstream/2.1.0_rc5+repack'
Update to upstream version '2.1.0~rc5+repack' with Debian dir 17b49a173603ba3f07a69dd6bec92e144d341596
Diffstat (limited to 'widgets/plotter.cpp')
-rw-r--r--widgets/plotter.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp
index 761dae08..98c1af16 100644
--- a/widgets/plotter.cpp
+++ b/widgets/plotter.cpp
@@ -123,6 +123,7 @@ void CPlotter::paintEvent(QPaintEvent *) // paint
void CPlotter::draw(float swide[], bool bScroll, bool bRed)
{
+ if (!m_TRperiod) return; // not ready to plot yet
int j,j0;
static int ktop=0;
float y,y2,ymin;
@@ -166,7 +167,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
ymin=1.e30;
if(swide[0]>1.e29 and swide[0]< 1.5e30) painter1.setPen(Qt::green);
- if(swide[0]>1.4e30) painter1.setPen(Qt::yellow);
+ if(swide[0]>1.4e30) painter1.setPen(Qt::red);
if(!m_bReplot) {
m_j=0;
int irow=-1;
@@ -235,13 +236,14 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
if(m_bReplot) return;
if(swide[0]>1.0e29) m_line=0;
+ if(m_mode=="FT4" and m_line==34) m_line=0;
if(m_line == painter1.fontMetrics ().height ()) {
painter1.setPen(Qt::white);
QString t;
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
int n=(ms/1000) % m_TRperiod;
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
- if(m_TRperiod < 60) {
+ if(m_TRperiod < 60 or m_mode=="FT4") {
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
} else {
t=t1.toString("hh:mm") + " " + m_rxBand;
@@ -409,7 +411,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
}
float bw=9.0*12000.0/m_nsps; //JT9
-
+ if(m_mode=="FT4") bw=3*12000.0/512.0; //FT4 ### (3x, or 4x???) ###
if(m_mode=="FT8") bw=7*12000.0/1920.0; //FT8
if(m_mode=="JT4") { //JT4
@@ -484,7 +486,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter0.drawLine(x1,24,x1,30);
}
- if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65" or m_mode=="QRA64" or m_mode=="FT8") {
+ if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65"
+ or m_mode=="QRA64" or m_mode=="FT8" or m_mode=="FT4") {
if(m_mode=="QRA64" or (m_mode=="JT65" and m_bVHF)) {
painter0.setPen(penGreen);
@@ -518,7 +521,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
}
if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65" or
- m_mode.mid(0,4)=="WSPR" or m_mode=="QRA64" or m_mode=="FT8") {
+ m_mode.mid(0,4)=="WSPR" or m_mode=="QRA64" or m_mode=="FT8"
+ or m_mode=="FT4") {
painter0.setPen(penRed);
x1=XfromFreq(m_txFreq);
x2=XfromFreq(m_txFreq+bw);