Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
be827b95
Commit
be827b95
authored
Jan 20, 2020
by
yannick legoc
Browse files
Filtering axis scans and replacing startedNumor by numor in VEXPController
parent
583dc543
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/controllers/vexp/VEXPController.cpp
View file @
be827b95
...
...
@@ -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
->
startedN
umor
());
writer
.
Key
(
"nameScan"
);
writer
.
Int
(
scanController
->
n
umor
());
writer
.
EndObject
();
...
...
src/controllers/vexp/VEXPController.h
View file @
be827b95
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment