Smaller increment adjustment for drift. 1 second interval lines.

This commit is contained in:
Jordan Sherer 2020-05-07 15:47:50 -04:00
parent 6bf4b41311
commit bf8fb4aa85
4 changed files with 15 additions and 5 deletions

View File

@ -4914,7 +4914,7 @@ void MainWindow::processDecodedLine(QByteArray t){
n -= (float)period;
n += computeFramesNeededForDecode(m)/RX_SAMPLE_RATE;
n -= xdt;
n -= xdt/2;
int xdtmin = qMin(n*1000, (float)DriftingDateTime::drift());
int xdtmax = qMax(n*1000, (float)DriftingDateTime::drift());

View File

@ -281,7 +281,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
m_bScaleOK=true;
}
void CPlotter::drawLine(const QColor &color, int ia, int ib)
void CPlotter::drawDecodeLine(const QColor &color, int ia, int ib)
{
int x1=XfromFreq(ia);
int x2=XfromFreq(ib);
@ -295,6 +295,15 @@ void CPlotter::drawLine(const QColor &color, int ia, int ib)
painter1.drawLine(qMax(x1, x2),0,qMax(x1, x2),9);
}
void CPlotter::drawHorizontalLine(const QColor &color, int x, int width)
{
QPen pen0(color, 1);
QPainter painter1(&m_WaterfallPixmap);
painter1.setPen(pen0);
painter1.drawLine(x,0,width <= 0 ? m_w : x+width,0);
}
void CPlotter::replot()
{
float swide[m_w];

View File

@ -90,7 +90,8 @@ public:
void setReference(bool b) {m_bReference = b;}
bool Reference() const {return m_bReference;}
#endif
void drawLine(const QColor &color, int ia, int ib);
void drawDecodeLine(const QColor &color, int ia, int ib);
void drawHorizontalLine(const QColor &color, int x, int width);
void setVHF(bool bVHF);
void setRedFile(QString fRed);
bool scaleOK () const {return m_bScaleOK;}

View File

@ -246,7 +246,7 @@ void WideGraph::saveSettings() //saveS
void WideGraph::drawLine(const QColor &color, int ia, int ib)
{
ui->widePlot->drawLine(color, ia, ib);
ui->widePlot->drawDecodeLine(color, ia, ib);
}
void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dataSink2
@ -357,7 +357,7 @@ void WideGraph::drawSwide(){
}
ui->widePlot->draw(swideLocal,true,false);
} else if(lastSecondInPeriod != secondInPeriod) {
drawLine(Qt::gray, ui->widePlot->startFreq(), 10);
ui->widePlot->drawHorizontalLine(Qt::white, 0, 5);
}
lastSecondInPeriod=secondInPeriod;