Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroAir committed Feb 14, 2024
1 parent 053bffc commit 926a8a8
Show file tree
Hide file tree
Showing 66 changed files with 3,253 additions and 4,329 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ add_subdirectory(modules)

add_subdirectory(${lithium_client_dir})

add_subdirectory(driver)

add_executable(lithium_server ${component_module} ${config_module} ${module_module} ${device_module} ${task_module} ${server_module} ${script_module} ${Lithium_module})

Expand Down
168 changes: 141 additions & 27 deletions config/template/camera.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,158 @@
{
"name": "",
"type": "",
"name": "Camera",
"type": "template",
"version": "1.0.0",
"license": "GPL-3",
"author": "Max Qian",
"description": "",
"description": "Camera command template for Atom",
"deliver": true,
"public": "atom.device",
"command": {
"startExposure": {
"startExposure": {
"force": true,
"command": "start_exposure",
"async": true,
"info": "Start exposure in async mode",
"params": [
{
"name": "name",
"type": "string",
"name": "exposure_time",
"type": "number",
"required": true,
"info": "The name of the device to start exposure"
"max": 100000000000,
"min": 0,
"default": 1000,
"info": "The exposure time in milliseconds"
},
{
"name": "args",
"type": "object",
"required": true,
"info": "Arguments to start exposure",
"params": [
{
"name": "exposure_time",
"type": "number",
"required": true,
"max": 114514,
"min": 0,
"info": "The exposure time in milliseconds"
}
]
"name": "is_save",
"type": "boolean",
"required": false,
"default": true,
"info": "Save the exposure image"
},
{
"name": "is_dark",
"type": "boolean",
"required": false,
"default": false,
"info": "If the image is dark"
}
],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the exposure is started or false if not"
}
},
"stopExposure": {
"force": true,
"command": "stop_exposure",
"async": true,
"info": "Stop exposure in async mode",
"params": [],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the exposure is stopped or false if not"
}
},
"getExposureStatus": {
"force": true,
"command": "get_exposure_status",
"async": true,
"info": "Get exposure status in async mode",
"params": [],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the camera is exposed or false if not"
}
},
"getExposureResult": {
"force": true,
"command": "get_exposure_result",
"async": true,
"info": "Get exposure image in async mode",
"params": [],
"result": {
"type": "string",
"ignore": false,
"info": "Return the exposure image in base64 format"
}
},
"startCooling": {
"force": true,
"command": "start_cooling",
"async": true,
"info": "Start cooling in async mode",
"params": [
{
"name": "temperature",
"type": "number",
"required": false,
"max": 100,
"min": 0,
"default": 0,
"info": "The target temperature in Celsius",
"note": "The target temperature is only valid when the camera is in cooling mode"
}
]
],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the cooling is started or false if not",
"note": "The temperature will slowly change to the target temperature, and the camera will be in cooling mode"
}
},
"stopCooling": {
"force": true,
"command": "stop_cooling",
"async": true,
"info": "Stop cooling in async mode",
"params": [],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the cooling is stopped or false if not",
"note": "The camera will be in idle mode"
}
},
"getCoolingStatus": {
"force": true,
"command": "get_cooling_status",
"async": true,
"info": "Get cooling status in async mode",
"params": [],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the camera is cooling or false if not"
}
},
"isCoolingAvailable": {
"force": true,
"command": "is_cooling_available",
"async": true,
"info": "Check if cooling is available in async mode",
"params": [],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if cooling is available or false if not"
}
},
"getCoolingTemperature": {
"force": true,
"command": "get_cooling_temperature",
"async": true,
"info": "Get cooling temperature in async mode",
"params": [],
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the current temperature is got successfully or false if not"
}
}
},
"result": {
"type": "boolean",
"ignore": false,
"info": "Return true if the exposure is started or false if not"
}

}
12 changes: 12 additions & 0 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# CMakeLists.txt for Atom-Driver
# This project is licensed under the terms of the GPL3 license.
#
# Project Name: Atom-Driver
# Description: A collection of drivers for Atom
# Author: Max Qian
# License: GPL3

cmake_minimum_required(VERSION 3.20)
project(atom-driver-interface C CXX)

add_subdirectory(solver)
12 changes: 12 additions & 0 deletions driver/solver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# CMakeLists.txt for Atom-Solver
# This project is licensed under the terms of the GPL3 license.
#
# Project Name: Atom-Solver
# Description: A collection of solvers for Atom
# Author: Max Qian
# License: GPL3

cmake_minimum_required(VERSION 3.20)
project(atom-solver C CXX)

add_subdirectory(atom-astrometry)
Empty file.
Empty file.
64 changes: 64 additions & 0 deletions driver/solver/atom-astrometry/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# CMakeLists.txt for Atom-Astrometry
# This project is licensed under the terms of the GPL3 license.
#
# Project Name: Atom-Astrometry
# Description: Astrometry command line interface for astrometry.net
# Author: Max Qian
# License: GPL3

cmake_minimum_required(VERSION 3.20)
project(atom-astrometry C CXX)

# Sources
set(${PROJECT_NAME}_SOURCES
astrometry.cpp
)

# Headers
set(${PROJECT_NAME}_HEADERS
astrometry.hpp
)

# Private Headers
set(${PROJECT_NAME}_PRIVATE_HEADERS
)

set(${PROJECT_NAME}_LIBS
atom
atom-components
atom-driver
atom-type
atom-utils)

# Build Object Library
add_library(${PROJECT_NAME}_OBJECT OBJECT)
set_property(TARGET ${PROJECT_NAME}_OBJECT PROPERTY POSITION_INDEPENDENT_CODE 1)

target_link_libraries(${PROJECT_NAME}_OBJECT loguru)
target_link_libraries(${PROJECT_NAME}_OBJECT ${${PROJECT_NAME}_LIBS})

target_sources(${PROJECT_NAME}_OBJECT
PUBLIC
${${PROJECT_NAME}_HEADERS}
PRIVATE
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_PRIVATE_HEADERS}
)

target_link_libraries(${PROJECT_NAME}_OBJECT ${${PROJECT_NAME}_LIBS})

add_library(${PROJECT_NAME} STATIC)

target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_OBJECT ${${PROJECT_NAME}_LIBS})
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
target_include_directories(${PROJECT_NAME} PUBLIC .)

set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${CMAKE_HYDROGEN_VERSION_STRING}
SOVERSION ${HYDROGEN_SOVERSION}
OUTPUT_NAME ${PROJECT_NAME}
)

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
Loading

0 comments on commit 926a8a8

Please sign in to comment.