Fixed Interferometer and BeamSteeringCW absolute center frequency display

This commit is contained in:
f4exb 2022-05-26 12:28:18 +02:00
parent 4b321a847f
commit 60a114b7b8
4 changed files with 18 additions and 0 deletions

View File

@ -78,6 +78,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message)
m_basebandSampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
displayRateAndShift();
updateAbsoluteCenterFrequency();
return true;
}
else if (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod::match(message))
@ -182,6 +183,7 @@ void BeamSteeringCWModGUI::displaySettings()
applyInterpolation();
ui->steeringDegreesText->setText(tr("%1").arg(m_settings.m_steerDegrees));
getRollupContents()->restoreState(m_rollupState);
updateAbsoluteCenterFrequency();
blockApplySettings(false);
}
@ -308,6 +310,7 @@ void BeamSteeringCWModGUI::applyPosition()
ui->filterChainText->setText(s);
displayRateAndShift();
updateAbsoluteCenterFrequency();
applySettings();
}
@ -325,3 +328,8 @@ void BeamSteeringCWModGUI::makeUIConnections()
QObject::connect(ui->position, &QSlider::valueChanged, this, &BeamSteeringCWModGUI::on_position_valueChanged);
QObject::connect(ui->steeringDegrees, &QSlider::valueChanged, this, &BeamSteeringCWModGUI::on_steeringDegrees_valueChanged);
}
void BeamSteeringCWModGUI::updateAbsoluteCenterFrequency()
{
setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_basebandSampleRate);
}

View File

@ -86,6 +86,7 @@ private:
void displayRateAndShift();
bool handleMessage(const Message& message);
void makeUIConnections();
void updateAbsoluteCenterFrequency();
void leaveEvent(QEvent*);
void enterEvent(QEvent*);

View File

@ -79,6 +79,7 @@ bool InterferometerGUI::handleMessage(const Message& message)
m_sampleRate = notif.getSampleRate();
m_centerFrequency = notif.getCenterFrequency();
displayRateAndShift();
updateAbsoluteCenterFrequency();
return true;
}
else if (Interferometer::MsgConfigureInterferometer::match(message))
@ -206,6 +207,7 @@ void InterferometerGUI::displaySettings()
ui->phaseCorrection->setValue(m_settings.m_phase);
ui->phaseCorrectionText->setText(tr("%1").arg(m_settings.m_phase));
getRollupContents()->restoreState(m_rollupState);
updateAbsoluteCenterFrequency();
blockApplySettings(false);
}
@ -345,6 +347,7 @@ void InterferometerGUI::applyPosition()
ui->filterChainText->setText(s);
displayRateAndShift();
updateAbsoluteCenterFrequency();
applySettings();
}
@ -362,3 +365,8 @@ void InterferometerGUI::makeUIConnections()
QObject::connect(ui->phaseCorrection, &QSlider::valueChanged, this, &InterferometerGUI::on_phaseCorrection_valueChanged);
QObject::connect(ui->correlationType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &InterferometerGUI::on_correlationType_currentIndexChanged);
}
void InterferometerGUI::updateAbsoluteCenterFrequency()
{
setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate);
}

View File

@ -88,6 +88,7 @@ private:
void displayRateAndShift();
bool handleMessage(const Message& message);
void makeUIConnections();
void updateAbsoluteCenterFrequency();
void leaveEvent(QEvent*);
void enterEvent(QEvent*);