Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
6b79bd97
Commit
6b79bd97
authored
Oct 20, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display angles in degrees in addition to motor steps
parent
fc12819f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
CalibrationHardwareInterface.java
src/main/java/CalibrationHardwareInterface.java
+16
-4
No files found.
src/main/java/CalibrationHardwareInterface.java
View file @
6b79bd97
...
@@ -2639,8 +2639,14 @@ public class CalibrationHardwareInterface {
...
@@ -2639,8 +2639,14 @@ public class CalibrationHardwareInterface {
enableMotors
(
true
);
// just in case?
enableMotors
(
true
);
// just in case?
updateMotorsPosition
(
1
);
// wait one second before testing to decrease re-test frequency
updateMotorsPosition
(
1
);
// wait one second before testing to decrease re-test frequency
if
(
updateStatus
)
{
if
(
updateStatus
)
{
IJ
.
showStatus
(
"Goniometer: tilt="
+
curpos
[
tiltMotor
]+
" ("
+
this
.
targetPosition
[
tiltMotor
]+
") "
+
double
axialAngle
=
curpos
[
axialMotor
]/
this
.
stepsPerDegreeAxial
;
", axial="
+
curpos
[
axialMotor
]+
" ("
+
this
.
targetPosition
[
axialMotor
]+
")"
);
double
tiltAngle
=
curpos
[
tiltMotor
]/
this
.
stepsPerDegreeTilt
;
double
axialTargetAngle
=
targetPosition
[
axialMotor
]/
this
.
stepsPerDegreeAxial
;
double
tiltTargetAngle
=
targetPosition
[
tiltMotor
]/
this
.
stepsPerDegreeTilt
;
IJ
.
showStatus
(
"Goniometer: tilt="
+
IJ
.
d2s
(
tiltAngle
,
1
)+
"\u00b0 ("
+
IJ
.
d2s
(
tiltTargetAngle
,
1
)+
"\u00b0) "
+
", axial="
+
IJ
.
d2s
(
axialAngle
,
1
)+
"\u00b0 ("
+
IJ
.
d2s
(
axialTargetAngle
,
1
)+
"\u00b0) "
+
" Tilt steps="
+
curpos
[
tiltMotor
]+
" ("
+
this
.
targetPosition
[
tiltMotor
]+
") "
+
", axial steps="
+
curpos
[
axialMotor
]+
" ("
+
this
.
targetPosition
[
axialMotor
]+
")"
);
}
}
int
positionError
=
Math
.
abs
(
this
.
targetPosition
[
motorNumber
]-
this
.
curpos
[
motorNumber
]);
int
positionError
=
Math
.
abs
(
this
.
targetPosition
[
motorNumber
]-
this
.
curpos
[
motorNumber
]);
if
(
positionError
<
this
.
motorTolerance
){
if
(
positionError
<
this
.
motorTolerance
){
...
@@ -2655,8 +2661,14 @@ public class CalibrationHardwareInterface {
...
@@ -2655,8 +2661,14 @@ public class CalibrationHardwareInterface {
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"User interrupt"
);
if
(
this
.
debugLevel
>
0
)
System
.
out
.
println
(
"User interrupt"
);
stopRequested
.
set
(
0
);
stopRequested
.
set
(
0
);
updateMotorsPosition
(
1
);
updateMotorsPosition
(
1
);
String
msg
=
"Goniometer: tilt="
+
curpos
[
tiltMotor
]+
" ("
+
this
.
targetPosition
[
tiltMotor
]+
") "
+
double
axialAngle
=
curpos
[
axialMotor
]/
this
.
stepsPerDegreeAxial
;
", axial="
+
curpos
[
axialMotor
]+
" ("
+
this
.
targetPosition
[
axialMotor
]+
")\n"
+
double
tiltAngle
=
curpos
[
tiltMotor
]/
this
.
stepsPerDegreeTilt
;
double
axialTargetAngle
=
targetPosition
[
axialMotor
]/
this
.
stepsPerDegreeAxial
;
double
tiltTargetAngle
=
targetPosition
[
tiltMotor
]/
this
.
stepsPerDegreeTilt
;
String
msg
=
"Goniometer: tilt="
+
IJ
.
d2s
(
tiltAngle
,
1
)+
"\u00b0 ("
+
IJ
.
d2s
(
tiltTargetAngle
,
1
)+
"\u00b0) "
+
", axial="
+
IJ
.
d2s
(
axialAngle
,
1
)+
"\u00b0 ("
+
IJ
.
d2s
(
axialTargetAngle
,
1
)+
"\u00b0) "
+
" Tilt steps="
+
curpos
[
tiltMotor
]+
" ("
+
this
.
targetPosition
[
tiltMotor
]+
") "
+
", axial steps="
+
curpos
[
axialMotor
]+
" ("
+
this
.
targetPosition
[
axialMotor
]+
")\n"
+
"OK to continue, Cancel to abort movement"
;
"OK to continue, Cancel to abort movement"
;
if
(!
IJ
.
showMessageWithCancel
(
"Goniometer interrupted"
,
msg
))
{
if
(!
IJ
.
showMessageWithCancel
(
"Goniometer interrupted"
,
msg
))
{
return
false
;
return
false
;
...
...
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