Commit be827b95 authored by yannick legoc's avatar yannick legoc

Filtering axis scans and replacing startedNumor by numor in VEXPController

parent 583dc543
......@@ -234,15 +234,20 @@ void VEXPController::updateNbPoints(int index) {
void VEXPController::updateScanStatus() {
bool running = scanController->commandStatus.isRunning();
runningScan.update(running);
if (running) {
// Get ki, kf, fixed, ss when the scan is starting.
updateFloat64PropertyValue(kiScan, ki());
updateFloat64PropertyValue(kfScan, kf());
updateInt32PropertyValue(fxScan, fx());
updateInt32PropertyValue(ssScan, ss());
if (isHKLScan()) {
bool running = scanController->commandStatus.isRunning();
runningScan.update(running);
if (running) {
// Get ki, kf, fixed, ss when the scan is starting.
updateFloat64PropertyValue(kiScan, ki());
updateFloat64PropertyValue(kfScan, kf());
updateInt32PropertyValue(fxScan, fx());
updateInt32PropertyValue(ssScan, ss());
}
}
else {
runningScan.update(false);
}
}
......@@ -295,7 +300,13 @@ void VEXPController::updateProperties() {
updateFloat64PropertyValue(denScan, scanController->delta.get(3));
updateInt32PropertyValue(nbPointsScan, scanController->nSteps.get(0));
runningScan.update(scanController->commandStatus.isRunning());
if (isHKLScan()) {
runningScan.update(scanController->commandStatus.isRunning());
}
else {
runningScan.update(false);
}
}
void VEXPController::updateFloat64PropertyValue(SimpleProperty<float64>& property, float64 value) {
......@@ -479,6 +490,15 @@ void VEXPController::calculate(float64 ki, float64 kf, float64 qh, float64 qk, f
// }
}
bool VEXPController::isHKLScan() {
if (scanController->controller.get(0) != "Scattering") {
return false;
}
return true;
}
std::string VEXPController::getSpyData() {
PrettyWriter<StringBuffer> writer(s);
......@@ -529,7 +549,7 @@ std::string VEXPController::getSpyData() {
writer.Key("ssScan"); writer.Int(ssScan());
writer.Key("runningScan"); writer.Bool(runningScan());
writer.Key("nameScan"); writer.Int(scanController->startedNumor());
writer.Key("nameScan"); writer.Int(scanController->numor());
writer.EndObject();
......
......@@ -80,12 +80,14 @@ public:
virtual void postConfiguration();
private:
void calculate(float64 ki, float64 kf, float64 qh, float64 qk, float64 ql, int32 fx, int32 ss);
void periodicUpdate();
std::string getSpyData();
bool isHKLScan();
Property<float64> as;
Property<float64> bs;
Property<float64> cs;
......
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