ClearAvg now erases the plot in Echo Graph.

This commit is contained in:
Joe Taylor 2022-09-01 11:49:06 -04:00
parent fd09b426ea
commit 14a3ba02f2
3 changed files with 12 additions and 0 deletions

View File

@ -114,3 +114,13 @@ bool EchoGraph::baseline()
{
return ui->cbBaseline->isChecked();
}
void EchoGraph::clearAvg()
{
for(int i=0; i<4096; i++) {
echocom_.blue[i]=0;
echocom_.red[i]=0;
}
echocom_.nsum=0;
plotSpec();
}

View File

@ -23,6 +23,7 @@ public:
void plotSpec();
void saveSettings();
void clearAvg();
bool baseline();
private slots:

View File

@ -3152,6 +3152,7 @@ void MainWindow::on_ClrAvgButton_clicked()
m_nclearave=1;
if(m_mode=="Echo") {
echocom_.nsum=0;
m_echoGraph->clearAvg();
} else {
if(m_msgAvgWidget != NULL) {
if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->displayAvg("");