Skip to content
Snippets Groups Projects
Verified Commit 576b753c authored by Tobias Triffterer's avatar Tobias Triffterer :house_with_garden:
Browse files

Show Number of Revolutions for Detector Position

In the real experiment and its manual, the detector position is mainly
measured in revolutions of the axis, one revolution moves the detector
by 2 mm.

To ease the understanding of the manual, the revolution number is added
to the GUI.
parent 2e00b980
No related branches found
No related tags found
No related merge requests found
Pipeline #3251 passed with stage
in 43 seconds
......@@ -187,7 +187,7 @@ QString ClientGui::getBeamholeStateString(const ExperimentState::BeamHoleState s
void ClientGui::displayExperimentState()
{
_ui.lblPressureValue->setText(QStringLiteral("%1 hPa\n%2 Torr").arg(_state.pressure).arg(_state.convertHectoPascalToTorr(_state.pressure)));
_ui.lblTargetPosition->setText(QStringLiteral("%1 mm from detector").arg(_state.targetPosition));
_ui.lblTargetPosition->setText(tr("%1 mm from detector (%L2 revolutions)").arg(_state.targetPosition).arg((_state.targetPosition - PositionZeroRevolutions) / TargetMovementMillimeterPerRevolution));
_ui.pbValveStatus->setValue(_state.vacuumValve);
_ui.pbAdcThreshold->setValue(_state.adcThreshold);
......
......@@ -66,6 +66,9 @@ public:
ClientGui& operator=(ClientGui&& other) = delete;
private:
static const constexpr double PositionZeroRevolutions = 14;
static const constexpr double TargetMovementMillimeterPerRevolution = 2;
const QString _name;
const QString _token;
std::unique_ptr<QWebSocket> _socket;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment