rebuild all cameras as .so-modules; add 16-bit monochrome ZWO-ASI support (not fully tested yet)

This commit is contained in:
2022-03-01 20:46:09 +03:00
parent d113aee650
commit bd70ff5bc8
17 changed files with 1045 additions and 493 deletions

View File

@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.20)
set(CCDLIB dummy_module)
set(DUMMYLIB ${CCDLIB} PARENT_SCOPE)
set(CCDLIB devdummy)
find_package(PkgConfig REQUIRED)
pkg_check_modules(${CCDLIB} REQUIRED usefull_macros)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
add_library(${CCDLIB} ${SRC})
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})
include_directories(${${CCDLIB}_INCLUDE_DIRS} ..)
link_directories(${${CCDLIB}_LIBRARY_DIRS})
add_library(${CCDLIB} SHARED ${SRC})
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})

View File

@@ -25,7 +25,11 @@
#include <unistd.h>
#include <usefull_macros.h>
#include "dummyfunc.h"
#include "ccdfunc.h"
extern Camera camera;
extern Focuser focuser;
extern Wheel wheel;
static const int filtermax = 5;
static const float focmaxpos = 10.;
@@ -120,7 +124,7 @@ static int camshutter(_U_ shutter_op s){
static int camsetgeom(frameformat *f){
if(!f) return FALSE;
DUMMYcam.geometry = *f;
camera.geometry = *f;
return TRUE;
}
@@ -135,7 +139,7 @@ static int camgmg(float *mg){
}
static int camggl(frameformat *max, frameformat *step){
if(max) *max = DUMMYcam.array;
if(max) *max = camera.array;
if(step) *step = (frameformat){1,1,1,1};
return TRUE;
}
@@ -210,6 +214,7 @@ static int stub(){
}
static void vstub(){
FNAME();
return;
}
static int istub(_U_ int N){return TRUE;}
@@ -217,13 +222,14 @@ static int istub(_U_ int N){return TRUE;}
/*
* Global objects: camera, focuser and wheel
*/
Camera DUMMYcam = {
__attribute__ ((visibility("default"))) Camera camera = {
.check = stub,
.Ndevices = 1,
.close = vstub,
.pollcapture = campoll,
.capture = camcapt,
.cancel = camcancel,
.startexposition = stub,
// setters:
.setDevNo = setdevno,
.setbrightness = camsetbrig,
@@ -258,7 +264,7 @@ Camera DUMMYcam = {
.geometry = {0},
};
Focuser DUMMYfocus = {
__attribute__ ((visibility("default"))) Focuser focuser = {
.check = stub,
.Ndevices = 1,
.close = vstub,
@@ -274,7 +280,7 @@ Focuser DUMMYfocus = {
.getMinPos = focmp,
};
Wheel DUMMYwheel = {
__attribute__ ((visibility("default"))) Wheel wheel = {
.check = stub,
.Ndevices = 1,
.close = vstub,

View File

@@ -1,29 +0,0 @@
/*
* This file is part of the CCD_Capture project.
* Copyright 2022 Edward V. Emelianov <edward.emelianoff@gmail.com>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef DUMMYFUNC_H__
#define DUMMYFUNC_H__
#include "ccdfunc.h"
extern Camera DUMMYcam;
extern Focuser DUMMYfocus;
extern Wheel DUMMYwheel;
#endif // DUMMYFUNC_H__