-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add a 'dome' attribute to Observatory. #231
Add a 'dome' attribute to Observatory. #231
Conversation
Add logger kwarg to create_dome_from_config, enabling caller to provide logger to be used.
pocs/observatory.py
Outdated
@@ -488,6 +498,8 @@ def _create_mount(self, mount_info=None): | |||
Note: | |||
This does not actually make a serial connection to the mount. To do so, | |||
call the 'mount.connect()' explicitly. | |||
TODO(jamessynge): Discuss this claim with Wilfred. SerialData automatically |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The claim is wrong as you point out and should be updated.
@@ -30,10 +26,10 @@ def create_dome_from_config(config): | |||
else: | |||
brand = dome_config.get('brand') | |||
driver = dome_config['driver'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already made it's way in, but this will fail if dome
is in config but driver
is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps that was intended but if so we should catch and warn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. This is certainly a fatal error in terms of creating the dome instance, and will most likely keep POCS from working as intended. Probably we should just raise an exception.
Add TODO about non-bisque mounts, which assumes all are serial.
…ng called, causing an exception because a str can't be called.
Codecov Report
@@ Coverage Diff @@
## develop #231 +/- ##
=========================================
- Coverage 80% 79.8% -0.2%
=========================================
Files 42 42
Lines 3170 3204 +34
Branches 412 415 +3
=========================================
+ Hits 2536 2557 +21
- Misses 495 503 +8
- Partials 139 144 +5
Continue to review full report at Codecov.
|
@@ -128,6 +135,9 @@ def status(self): | |||
status['mount']['mount_target_ha'] = self.observer.target_hour_angle( | |||
t, self.mount.get_target_coordinates()) | |||
|
|||
if self.dome: | |||
status['dome'] = self.dome.status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this has already been merged, but it's a little odd that status
is a property here but a method for everything else. Why not make the dome status a method?
Add logger kwarg to create_dome_from_config, enabling caller
to provide logger to be used.