Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
2f178ef7
Commit
2f178ef7
authored
Jun 18, 2021
by
Valentin Valls
Browse files
Merge the duplication code
parent
d6252c33
Changes
1
Hide whitespace changes
Inline
Side-by-side
bliss/shell/standard.py
View file @
2f178ef7
...
...
@@ -936,7 +936,7 @@ def __umove(*args, **kwargs):
print
(
""
)
magic_char
=
"
\033
[F"
while
group
.
is_moving
:
def
format_group
(
group
)
:
positions
=
group
.
position_with_reals
dials
=
group
.
dial_with_reals
row
=
""
.
join
(
...
...
@@ -948,21 +948,16 @@ def __umove(*args, **kwargs):
]
)
ret_depth
=
magic_char
*
row
.
count
(
"
\n
"
)
print
(
"{}{}"
.
format
(
ret_depth
,
row
),
end
=
""
,
flush
=
True
)
return
"{}{}"
.
format
(
ret_depth
,
row
)
while
group
.
is_moving
:
string
=
format_group
(
group
)
print
(
string
,
end
=
""
,
flush
=
True
)
sleep
(
0.1
)
# print last time for final positions
positions
=
group
.
position_with_reals
dials
=
group
.
dial_with_reals
row
=
""
.
join
(
[
"user "
,
__row_positions
(
positions
,
motors
,
rfmt
,
sep
=
" "
),
"
\n
dial "
,
__row_positions
(
dials
,
motors
,
rfmt
,
sep
=
" "
),
]
)
ret_depth
=
magic_char
*
row
.
count
(
"
\n
"
)
print
(
"{}{}"
.
format
(
ret_depth
,
row
),
end
=
""
,
flush
=
True
)
string
=
format_group
(
group
)
print
(
string
,
end
=
""
,
flush
=
True
)
print
(
""
)
return
group
,
motor_pos
...
...
Write
Preview
Supports
Markdown
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