Commit f17e8e68 authored by yannick legoc's avatar yannick legoc
Browse files

Changed parameters for D22AutoConfig

parent f2000273
......@@ -62,6 +62,7 @@ AutoConfig::AutoConfig(const std::string& name) :
wantedType.setEnumeratedLabels(type);
m_d22settings.init(this, "settings");
m_simulation.init(this, "simulation");
m_driver.init(this, "driver");
}
......@@ -168,7 +169,8 @@ void AutoConfig::start() {
request.mutable_parameters()->set_wavelength(m_d22settings->wavelengthPosition.setpoint());
request.mutable_parameters()->set_collimation(m_d22settings->colSetupPosition.setpoint());
request.set_type(lssautoconfig::NumorRequest_Type::NumorRequest_Type_Background);
request.set_samplemodel(m_simulation->displaySampleModelName());
request.set_backgroundmodel(m_simulation->displayBackgroundModelName());
// Get the data from the active count controller.
acquisition::Count* count = nullptr;
......
......@@ -23,6 +23,7 @@
#include <cameo/cameo.h>
#include <controllers/lss/d22/D22Settings.h>
#include <controllers/common/utilities/CountSpy.h>
#include <controllers/lss/remotelsssimulation/RemoteLSSSimulation.h>
#include <drivers/utilities/null/NullDriver.h>
namespace d22 {
......@@ -82,6 +83,7 @@ private:
std::unique_ptr<cameo::application::Instance> m_remoteApplication;
ControllerPtr<D22Settings> m_d22settings;
ControllerPtr<remotelsssimulation::RemoteLSSSimulation> m_simulation;
DriverPtr<driver::NullDriver> m_driver;
utilities::CountSpy* m_countSpy;
};
......
......@@ -15,15 +15,12 @@ message NumorRequest {
required string instrumentName = 1;
required InstrumentParameters parameters = 2;
enum Type {
SampleModel = 1;
Background = 2;
}
required Type type = 3;
required int32 xSize = 4;
required int32 ySize = 5;
required bytes data = 6;
required string sampleModel = 3;
required string backgroundModel = 4;
required int32 xSize = 5;
required int32 ySize = 6;
required bytes data = 7;
}
message Result {
......
......@@ -96,6 +96,11 @@ VEXPController::VEXPController(const string& name) :
dqlScan.init(this, NOSAVE, "dql_scan");
denScan.init(this, NOSAVE, "den_scan");
kiScan.init(this, NOSAVE, "ki_scan");
kfScan.init(this, NOSAVE, "kf_scan");
fxScan.init(this, NOSAVE, "fx_scan");
ssScan.init(this, NOSAVE, "ss_scan");
nbPointsScan.init(this, NOSAVE, "nb_points_scan");
runningScan.init(this, NOSAVE, "running_scan");
......@@ -214,8 +219,22 @@ void VEXPController::updateScanDelta(int index) {
}
}
void VEXPController::updateNbPoints(int index) {
nbPointsScan.update(scanController->nSteps.get(0));
}
void VEXPController::updateScanStatus() {
runningScan.update(scanController->commandStatus.isRunning());
bool running = scanController->commandStatus.isRunning();
runningScan.update(running);
if (running) {
// Get ki, kf, fixed, ss when the scan is starting.
kiScan = ki();
kfScan = kf();
fxScan = fx();
ssScan = ss();
}
}
void VEXPController::updateProperties() {
......@@ -324,6 +343,7 @@ void VEXPController::postConfiguration() {
// Scan properties.
registerUpdater(scanController->reference, &VEXPController::updateScanReference, this);
registerUpdater(scanController->delta, &VEXPController::updateScanDelta, this);
registerUpdater(scanController->nSteps, &VEXPController::updateNbPoints, this);
registerStatus(scanController, &VEXPController::updateScanStatus, this);
updateProperties();
......
......@@ -65,6 +65,7 @@ public:
void updateScanReference(int index);
void updateScanDelta(int index);
void updateNbPoints(int index);
void updateScanStatus();
virtual void postConfiguration();
......@@ -134,6 +135,11 @@ public:
Property<float64> dqlScan;
Property<float64> denScan;
Property<float64> kiScan;
Property<float64> kfScan;
Property<int32> fxScan;
Property<int32> ssScan;
Property<int32> nbPointsScan;
Property<bool> runningScan;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment