Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cem40 #1170

Merged
merged 1 commit into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/panoptes/pocs/mount/ioptron/cem40.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from astropy import units as u
from astropy.coordinates import SkyCoord
from dateutil.parser import parse as parse_date
from panoptes.utils.time import current_time
from panoptes.utils import error as error
from panoptes.pocs.mount.serial import AbstractSerialMount
Expand Down Expand Up @@ -188,7 +189,7 @@ def search_for_home(self):
self.logger.info('Searching for the home position.')
self.query('search_for_home')

def _set_initial_rates(self, alt_limit='+00', meridian_treatment='100'):
def _set_initial_rates(self, alt_limit='+30', meridian_treatment='015'):
# Make sure we start at sidereal
self.query('set_sidereal_tracking')

Expand Down Expand Up @@ -354,7 +355,10 @@ def _update_status(self):
self.state == MountState.TRACKING_PEC
self._is_slewing = self.state == MountState.SLEWING

status['timestamp'] = self.query('get_local_time')
# Get offset in hours (as int) then parse rearranged time string.
ts = self.query('get_local_time')
offset = int(float(ts[:4]) / 60)
status['timestamp'] = parse_date(f'{ts[5:11]}T{ts[11:]}{offset}', yearfirst=True)
status['tracking_rate_ra'] = self.tracking_rate

return status
Expand Down
2 changes: 1 addition & 1 deletion src/panoptes/pocs/mount/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, location, *args, **kwargs):

@property
def _port(self):
return self.serial.ser.port
return self.serial.port

def connect(self):
"""Connects to the mount via the serial port (`self._port`)
Expand Down