Skip to content
Open
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
264 changes: 0 additions & 264 deletions RBD-Notes.txt

This file was deleted.

40 changes: 0 additions & 40 deletions alpaca-device.mustache

This file was deleted.

12 changes: 6 additions & 6 deletions device/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
##############################
# FOR EACH ASCOM DEVICE TYPE #
##############################
import rotator
import observingconditions

#--------------
API_VERSION = 1
Expand Down Expand Up @@ -140,7 +140,7 @@ def init_routes(app: App, devname: str, module):

Args:
app (App): The instance of the Falcon processor app
devname (str): The name of the device (e.g. 'rotator")
devname (str): The name of the device (e.g. 'observingconditions")
module (module): Module object containing responder classes

Notes:
Expand Down Expand Up @@ -223,14 +223,14 @@ def main():
# Share this logger throughout
log.logger = logger
exceptions.logger = logger
rotator.start_rot_device(logger)
#observingconditions.start_rot_device(logger)
discovery.logger = logger
set_shr_logger(logger)

#########################
# FOR EACH ASCOM DEVICE #
#########################
rotator.logger = logger
observingconditions.logger = logger

# -----------------------------
# Last-Chance Exception Handler
Expand All @@ -253,14 +253,14 @@ def main():
#########################
# FOR EACH ASCOM DEVICE #
#########################
init_routes(falc_app, 'rotator', rotator)
init_routes(falc_app, 'observingconditions', observingconditions)
#
# Initialize routes for Alpaca support endpoints
falc_app.add_route('/management/apiversions', management.apiversions())
falc_app.add_route(f'/management/v{API_VERSION}/description', management.description())
falc_app.add_route(f'/management/v{API_VERSION}/configureddevices', management.configureddevices())
falc_app.add_route('/setup', setup.svrsetup())
falc_app.add_route(f'/setup/v{API_VERSION}/rotator/{{devnum}}/setup', setup.devsetup())
falc_app.add_route(f'/setup/v{API_VERSION}/observingconditions/{{devnum}}/setup', setup.devsetup())

#
# Install the unhandled exception processor. See above,
Expand Down
2 changes: 1 addition & 1 deletion device/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ip_address = '' # Any address
port = 5555

[server]
location = 'Anywhere on Earth' # Anything you want here
location = 'Obs in Lauchhammer' # Anything you want here
verbose_driver_exceptions = true

[device]
Expand Down
8 changes: 4 additions & 4 deletions device/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from config import Config
from logging import Logger
# For each *type* of device served
from rotator import RotatorMetadata
from observingconditions import ObservingconditionsMetadata

logger: Logger = None
#logger = None # Safe on Python 3.7 but no intellisense in VSCode etc.
Expand Down Expand Up @@ -84,10 +84,10 @@ class configureddevices():
def on_get(self, req: Request, resp: Response):
confarray = [ # TODO ADD ONE FOR EACH DEVICE TYPE AND INSTANCE SERVED
{
'DeviceName' : RotatorMetadata.Name,
'DeviceType' : RotatorMetadata.DeviceType,
'DeviceName' : ObservingconditionsMetadata.Name,
'DeviceType' : ObservingconditionsMetadata.DeviceType,
'DeviceNumber' : 0,
'UniqueID' : RotatorMetadata.DeviceID
'UniqueID' : ObservingconditionsMetadata.DeviceID
}
]
resp.text = PropertyResponse(confarray, req).json
Loading