Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
telescope
Commits
688868c5
Commit
688868c5
authored
Sep 08, 2022
by
Tammo Jan Dijkema
Browse files
Clean up tracking info
parent
c3645089
Changes
1
Hide whitespace changes
Inline
Side-by-side
telescope.py
View file @
688868c5
import
socket
import
logging
import
time
import
atexit
from
datetime
import
datetime
from
astropy.coordinates
import
SkyCoord
,
RangeError
from
configparser
import
ConfigParser
...
...
@@ -22,6 +23,13 @@ _AZIMUTH_GEAR = 15006.75 # from dt_ctrl.ctrl
_ELEVATION_GEAR
=
44803.125
def
clearTrackingInfo
():
try
:
os
.
remove
(
"/tmp/telescope_trackinginfo"
)
except
OSError
:
pass
class
Telescope
:
def
__init__
(
self
,
setmode
=
None
,
consoleHost
=
None
,
waitForFirstUpdate
=
False
):
"""
...
...
@@ -628,6 +636,7 @@ class Telescope:
f
.
write
(
str
(
pid
)
+
'
\n
'
)
f
.
write
(
script_name
+
'
\n
'
)
f
.
write
(
script_arguments
)
atexit
.
register
(
clearTrackingInfo
)
def
getTrackingInfo
(
self
):
"""
...
...
@@ -647,7 +656,7 @@ class Telescope:
if
psutil
.
pid_exists
(
int
(
pid
)):
return
script_name
.
strip
(),
script_arguments
.
strip
()
else
:
os
.
remove
(
"/tmp/telescope_t
racking
i
nfo
"
)
clearT
racking
I
nfo
(
)
return
None
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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