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

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

View File

@ -56,26 +56,29 @@ if(DEFINED IMAGEVIEW AND IMAGEVIEW STREQUAL "yes")
endif() endif()
add_subdirectory(Dummy_cameras) add_subdirectory(Dummy_cameras)
list(APPEND ${PROJ}_INCLUDE_DIRS Dummy_cameras) #list(APPEND ${PROJ}_INCLUDE_DIRS Dummy_cameras)
list(APPEND ${PROJ}_LIBRARIES ${DUMMYLIB}) #list(APPEND ${PROJ}_LIBRARIES ${DUMMYLIB})
include_directories(Dummy_cameras) #include_directories(Dummy_cameras)
#add_custom_target(plugins)
#add_dependencies(plugins devdummy)
# additional modules with CCD/CMOS support # additional modules with CCD/CMOS support
if(DEFINED ZWO AND ZWO STREQUAL "yes") if(DEFINED ZWO AND ZWO STREQUAL "yes")
add_subdirectory(ZWO_cameras) add_subdirectory(ZWO_cameras)
list(APPEND ${PROJ}_INCLUDE_DIRS ZWO_cameras) # list(APPEND ${PROJ}_INCLUDE_DIRS ZWO_cameras)
add_definitions(-DUSEZWO) # add_definitions(-DUSEZWO)
list(APPEND ${PROJ}_LIBRARIES ${ZWOLIB}) # list(APPEND ${PROJ}_LIBRARIES ${ZWOLIB})
include_directories(ZWO_cameras) # include_directories(ZWO_cameras)
endif() endif()
# additional modules with CCD/CMOS support # additional modules with CCD/CMOS support
if(DEFINED FLI AND FLI STREQUAL "yes") if(DEFINED FLI AND FLI STREQUAL "yes")
add_subdirectory(FLI_cameras) add_subdirectory(FLI_cameras)
list(APPEND ${PROJ}_INCLUDE_DIRS FLI_cameras) # list(APPEND ${PROJ}_INCLUDE_DIRS FLI_cameras)
add_definitions(-DUSEFLI) # add_definitions(-DUSEFLI)
list(APPEND ${PROJ}_LIBRARIES ${FLILIB}) # list(APPEND ${PROJ}_LIBRARIES ${FLILIB})
include_directories(FLI_cameras) # include_directories(FLI_cameras)
endif() endif()

View File

@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
set(CCDLIB dummy_module) set(CCDLIB devdummy)
set(DUMMYLIB ${CCDLIB} PARENT_SCOPE)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(${CCDLIB} REQUIRED usefull_macros) pkg_check_modules(${CCDLIB} REQUIRED usefull_macros)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC) aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
add_library(${CCDLIB} ${SRC})
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})
include_directories(${${CCDLIB}_INCLUDE_DIRS} ..) include_directories(${${CCDLIB}_INCLUDE_DIRS} ..)
link_directories(${${CCDLIB}_LIBRARY_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 <unistd.h>
#include <usefull_macros.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 int filtermax = 5;
static const float focmaxpos = 10.; static const float focmaxpos = 10.;
@ -120,7 +124,7 @@ static int camshutter(_U_ shutter_op s){
static int camsetgeom(frameformat *f){ static int camsetgeom(frameformat *f){
if(!f) return FALSE; if(!f) return FALSE;
DUMMYcam.geometry = *f; camera.geometry = *f;
return TRUE; return TRUE;
} }
@ -135,7 +139,7 @@ static int camgmg(float *mg){
} }
static int camggl(frameformat *max, frameformat *step){ 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}; if(step) *step = (frameformat){1,1,1,1};
return TRUE; return TRUE;
} }
@ -210,6 +214,7 @@ static int stub(){
} }
static void vstub(){ static void vstub(){
FNAME();
return; return;
} }
static int istub(_U_ int N){return TRUE;} 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 * Global objects: camera, focuser and wheel
*/ */
Camera DUMMYcam = { __attribute__ ((visibility("default"))) Camera camera = {
.check = stub, .check = stub,
.Ndevices = 1, .Ndevices = 1,
.close = vstub, .close = vstub,
.pollcapture = campoll, .pollcapture = campoll,
.capture = camcapt, .capture = camcapt,
.cancel = camcancel, .cancel = camcancel,
.startexposition = stub,
// setters: // setters:
.setDevNo = setdevno, .setDevNo = setdevno,
.setbrightness = camsetbrig, .setbrightness = camsetbrig,
@ -258,7 +264,7 @@ Camera DUMMYcam = {
.geometry = {0}, .geometry = {0},
}; };
Focuser DUMMYfocus = { __attribute__ ((visibility("default"))) Focuser focuser = {
.check = stub, .check = stub,
.Ndevices = 1, .Ndevices = 1,
.close = vstub, .close = vstub,
@ -274,7 +280,7 @@ Focuser DUMMYfocus = {
.getMinPos = focmp, .getMinPos = focmp,
}; };
Wheel DUMMYwheel = { __attribute__ ((visibility("default"))) Wheel wheel = {
.check = stub, .check = stub,
.Ndevices = 1, .Ndevices = 1,
.close = vstub, .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__

View File

@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
set(CCDLIB fli_module) set(CCDLIB devfli)
set(FLILIB ${CCDLIB} PARENT_SCOPE)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(${CCDLIB} REQUIRED fli>=1.71 usefull_macros) pkg_check_modules(${CCDLIB} REQUIRED fli>=1.71 usefull_macros)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC) aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
add_library(${CCDLIB} ${SRC})
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})
include_directories(${${CCDLIB}_INCLUDE_DIRS} ..) include_directories(${${CCDLIB}_INCLUDE_DIRS} ..)
link_directories(${${CCDLIB}_LIBRARY_DIRS}) link_directories(${${CCDLIB}_LIBRARY_DIRS})
add_library(${CCDLIB} SHARED ${SRC})
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES})

View File

@ -21,7 +21,11 @@
#include <string.h> #include <string.h>
#include <usefull_macros.h> #include <usefull_macros.h>
#include "flifunc.h" #include "ccdfunc.h"
extern Camera camera;
extern Focuser focuser;
extern Wheel wheel;
#define LIBVERSIZ 1024 #define LIBVERSIZ 1024
@ -124,12 +128,12 @@ static int fli_findCCD(){
return FALSE; return FALSE;
} }
if(!camz){ // build cameras list if(!camz){ // build cameras list
FLIcam.Ndevices = findcams(FLIDOMAIN_USB | FLIDEVICE_CAMERA, &camz); camera.Ndevices = findcams(FLIDOMAIN_USB | FLIDEVICE_CAMERA, &camz);
if(!FLIcam.Ndevices){ if(!camera.Ndevices){
DBG("No cameras"); DBG("No cameras");
return FALSE; return FALSE;
} }
for(int i = 0; i < FLIcam.Ndevices; i++){ for(int i = 0; i < camera.Ndevices; i++){
DBG("Camera '%s', domain %s", camz[i].name, camz[i].dname); DBG("Camera '%s', domain %s", camz[i].name, camz[i].dname);
} }
} }
@ -137,7 +141,7 @@ static int fli_findCCD(){
} }
static int fli_setActiceCam(int n){ static int fli_setActiceCam(int n){
if(!camz && !fli_findCCD()) return FALSE; if(!camz && !fli_findCCD()) return FALSE;
if(n >= FLIcam.Ndevices){ if(n >= camera.Ndevices){
return FALSE; return FALSE;
} }
FLIClose(camdev); FLIClose(camdev);
@ -157,25 +161,25 @@ static int fli_setActiceCam(int n){
TRYFUNC(FLIGetPixelSize, camdev, &x, &y); TRYFUNC(FLIGetPixelSize, camdev, &x, &y);
if(!fli_err){ if(!fli_err){
DBG("Pixel size: %g x %g", x,y); DBG("Pixel size: %g x %g", x,y);
FLIcam.pixX = (float)x; camera.pixX = (float)x;
FLIcam.pixY = (float)y; camera.pixY = (float)y;
} }
long x0, x1, y0, y1; long x0, x1, y0, y1;
TRYFUNC(FLIGetVisibleArea, camdev, &x0, &y0, &x1, &y1); TRYFUNC(FLIGetVisibleArea, camdev, &x0, &y0, &x1, &y1);
if(!fli_err){ if(!fli_err){
DBG("Field of view: (%ld, %ld)(%ld, %ld)", x0, y0, x1, y1); DBG("Field of view: (%ld, %ld)(%ld, %ld)", x0, y0, x1, y1);
FLIcam.field = (frameformat){.w = x1 - x0, .h = y1 - y0, .xoff = x0, .yoff = y0}; camera.field = (frameformat){.w = x1 - x0, .h = y1 - y0, .xoff = x0, .yoff = y0};
} }
TRYFUNC(FLIGetArrayArea, camdev, &x0, &y0, &x1, &y1); TRYFUNC(FLIGetArrayArea, camdev, &x0, &y0, &x1, &y1);
if(!fli_err){ if(!fli_err){
DBG("Array field: (%ld, %ld)(%ld, %ld)", x0, y0, x1, y1); DBG("Array field: (%ld, %ld)(%ld, %ld)", x0, y0, x1, y1);
FLIcam.array = (frameformat){.w = x1 - x0, .h = y1 - y0, .xoff = x0, .yoff = y0}; camera.array = (frameformat){.w = x1 - x0, .h = y1 - y0, .xoff = x0, .yoff = y0};
} }
return TRUE; return TRUE;
} }
static int fli_geomlimits(frameformat *l, frameformat *s){ static int fli_geomlimits(frameformat *l, frameformat *s){
if(l) *l = FLIcam.array; if(l) *l = camera.array;
if(s) *s = (frameformat){.w = 1, .h = 1, .xoff = 1, .yoff = 1}; if(s) *s = (frameformat){.w = 1, .h = 1, .xoff = 1, .yoff = 1};
return TRUE; return TRUE;
} }
@ -187,12 +191,12 @@ static int fli_findFocuser(){
return FALSE; return FALSE;
} }
if(!focz){ if(!focz){
FLIfocus.Ndevices = findcams(FLIDOMAIN_USB | FLIDEVICE_FOCUSER, &focz); focuser.Ndevices = findcams(FLIDOMAIN_USB | FLIDEVICE_FOCUSER, &focz);
if(!FLIfocus.Ndevices){ if(!focuser.Ndevices){
DBG("No focusers"); DBG("No focusers");
return FALSE; return FALSE;
} }
for(int i = 0; i < FLIfocus.Ndevices; i++){ for(int i = 0; i < focuser.Ndevices; i++){
DBG("Focuser '%s', domain %s", focz[i].name, focz[i].dname); DBG("Focuser '%s', domain %s", focz[i].name, focz[i].dname);
} }
} }
@ -200,10 +204,10 @@ static int fli_findFocuser(){
} }
static int fli_setActiceFocuser(int n){ static int fli_setActiceFocuser(int n){
if(!focz && !fli_findFocuser()) return FALSE; if(!focz && !fli_findFocuser()) return FALSE;
if(n >= FLIfocus.Ndevices) return FALSE; if(n >= focuser.Ndevices) return FALSE;
FLIClose(focdev); FLIClose(focdev);
int OK = FALSE; int OK = FALSE;
for(int i = 0; i < FLIfocus.Ndevices; ++i){ for(int i = 0; i < focuser.Ndevices; ++i){
DBG("Try %s", focz[i].name); DBG("Try %s", focz[i].name);
TRYFUNC(FLIOpen, &focdev, focz[i].name, focz[i].domain); TRYFUNC(FLIOpen, &focdev, focz[i].name, focz[i].domain);
if(fli_err) continue; if(fli_err) continue;
@ -295,12 +299,12 @@ static int fli_findWheel(){
DBG("FLI not found"); DBG("FLI not found");
return FALSE; return FALSE;
} }
FLIwheel.Ndevices = findcams(FLIDOMAIN_USB | FLIDEVICE_FILTERWHEEL, &whlz); wheel.Ndevices = findcams(FLIDOMAIN_USB | FLIDEVICE_FILTERWHEEL, &whlz);
if(!FLIwheel.Ndevices){ if(!wheel.Ndevices){
DBG("No wheels"); DBG("No wheels");
return FALSE; return FALSE;
} }
for(int i = 0; i < FLIwheel.Ndevices; i++){ for(int i = 0; i < wheel.Ndevices; i++){
DBG("Wheel '%s', domain %s", whlz[i].name, whlz[i].dname); DBG("Wheel '%s', domain %s", whlz[i].name, whlz[i].dname);
} }
return TRUE; return TRUE;
@ -310,10 +314,10 @@ static int fli_wgetpos(int *p);
static int fli_setActiceWheel(int n){ static int fli_setActiceWheel(int n){
if(!whlz && !fli_findWheel()) return FALSE; if(!whlz && !fli_findWheel()) return FALSE;
if(n >= FLIwheel.Ndevices) return FALSE; if(n >= wheel.Ndevices) return FALSE;
FLIClose(whldev); FLIClose(whldev);
int OK = FALSE; int OK = FALSE;
for(int i = 0; i < FLIfocus.Ndevices; ++i){ for(int i = 0; i < focuser.Ndevices; ++i){
DBG("Try %s", whlz[i].name); DBG("Try %s", whlz[i].name);
TRYFUNC(FLIOpen, &whldev, whlz[i].name, whlz[i].domain); TRYFUNC(FLIOpen, &whldev, whlz[i].name, whlz[i].domain);
if(fli_err) continue; if(fli_err) continue;
@ -390,6 +394,17 @@ static int fli_wgett(float *t){
return TRUE; return TRUE;
} }
static int fli_startexp(){
DBG("Start exposition");
TRYFUNC(FLIExposeFrame, camdev);
if(fli_err){
TRYFUNC(FLICancelExposure, camdev);
return FALSE;
}
capStatus = CAPTURE_PROCESS;
return TRUE;
}
static int fli_pollcapt(capture_status *st, float *remain){ static int fli_pollcapt(capture_status *st, float *remain){
static int errctr = 0; static int errctr = 0;
if(capStatus == CAPTURE_READY){ if(capStatus == CAPTURE_READY){
@ -398,14 +413,7 @@ static int fli_pollcapt(capture_status *st, float *remain){
} }
if(capStatus == CAPTURE_NO){ // start capture if(capStatus == CAPTURE_NO){ // start capture
errctr = 0; errctr = 0;
DBG("Start exposition"); goto retn;
TRYFUNC(FLIExposeFrame, camdev);
if(fli_err){
TRYFUNC(FLICancelExposure, camdev);
if(st) *st = CAPTURE_CANTSTART;
return FALSE;
}
capStatus = CAPTURE_PROCESS;
} }
if(capStatus == CAPTURE_PROCESS){ if(capStatus == CAPTURE_PROCESS){
TRYFUNC(FLIGetExposureStatus, camdev, &tmpl); TRYFUNC(FLIGetExposureStatus, camdev, &tmpl);
@ -428,6 +436,7 @@ static int fli_pollcapt(capture_status *st, float *remain){
}else{ // some error }else{ // some error
if(st) *st = CAPTURE_ABORTED; if(st) *st = CAPTURE_ABORTED;
capStatus = CAPTURE_NO; capStatus = CAPTURE_NO;
return FALSE;
} }
retn: retn:
if(st) *st = capStatus; if(st) *st = capStatus;
@ -469,7 +478,7 @@ static int fli_setgeometry(frameformat *f){
TRYFUNC(FLISetImageArea, camdev, f->xoff, f->yoff, TRYFUNC(FLISetImageArea, camdev, f->xoff, f->yoff,
f->xoff + f->w/curhbin, f->yoff + f->h/curvbin); f->xoff + f->w/curhbin, f->yoff + f->h/curvbin);
if(fli_err) return FALSE; if(fli_err) return FALSE;
FLIcam.geometry = *f; camera.geometry = *f;
return TRUE; return TRUE;
} }
@ -571,7 +580,7 @@ static int fli_setio(int io){
} }
static int fli_setexp(float t){ static int fli_setexp(float t){
long e = (long)(t*1000.); long e = (long)(t*1000.); // milliseconds!
TRYFUNC(FLISetExposureTime, camdev, e); TRYFUNC(FLISetExposureTime, camdev, e);
if(fli_err) return FALSE; if(fli_err) return FALSE;
return TRUE; return TRUE;
@ -615,15 +624,15 @@ static void camt_free(cam_t **c, int n, flidev_t dev){
static void fli_closecam(){ static void fli_closecam(){
DBG("CAMERA CLOSE"); DBG("CAMERA CLOSE");
camt_free(&camz, FLIcam.Ndevices, camdev); camt_free(&camz, camera.Ndevices, camdev);
} }
static void fli_closefocuser(){ static void fli_closefocuser(){
DBG("FOCUSER CLOSE"); DBG("FOCUSER CLOSE");
camt_free(&focz, FLIfocus.Ndevices, focdev); camt_free(&focz, focuser.Ndevices, focdev);
} }
static void fli_closewheel(){ static void fli_closewheel(){
DBG("WHEEL CLOSE"); DBG("WHEEL CLOSE");
camt_free(&whlz, FLIwheel.Ndevices, whldev); camt_free(&whlz, wheel.Ndevices, whldev);
} }
static int fli_ffalse(_U_ float f){ return FALSE; } static int fli_ffalse(_U_ float f){ return FALSE; }
@ -632,12 +641,13 @@ static int fli_fpfalse(_U_ float *f){ return FALSE; }
/* /*
* Global objects: camera, focuser and wheel * Global objects: camera, focuser and wheel
*/ */
Camera FLIcam = { Camera camera = {
.check = fli_findCCD, .check = fli_findCCD,
.close = fli_closecam, .close = fli_closecam,
.pollcapture = fli_pollcapt, .pollcapture = fli_pollcapt,
.capture = fli_capt, .capture = fli_capt,
.cancel = fli_cancel, .cancel = fli_cancel,
.startexposition = fli_startexp,
// setters: // setters:
.setDevNo = fli_setActiceCam, .setDevNo = fli_setActiceCam,
.setbrightness = fli_ffalse, .setbrightness = fli_ffalse,
@ -665,10 +675,9 @@ Camera FLIcam = {
.getTbody = fli_getTbody, .getTbody = fli_getTbody,
.getbin = fli_getbin, .getbin = fli_getbin,
.getio = fli_getio, .getio = fli_getio,
.geometry = {0},
}; };
Focuser FLIfocus = { Focuser focuser = {
.check = fli_findFocuser, .check = fli_findFocuser,
.setDevNo = fli_setActiceFocuser, .setDevNo = fli_setActiceFocuser,
.close = fli_closefocuser, .close = fli_closefocuser,
@ -681,7 +690,7 @@ Focuser FLIfocus = {
.setAbsPos = fli_fgoto, .setAbsPos = fli_fgoto,
}; };
Wheel FLIwheel = { Wheel wheel = {
.check = fli_findWheel, .check = fli_findWheel,
.setDevNo = fli_setActiceWheel, .setDevNo = fli_setActiceWheel,
.close = fli_closewheel, .close = fli_closewheel,

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 FLIFUNC_H__
#define FLIFUNC_H__
#include "ccdfunc.h"
extern Camera FLIcam;
extern Focuser FLIfocus;
extern Wheel FLIwheel;
#endif // FLIFUNC_H__

View File

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

View File

@ -16,8 +16,495 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "zwofunc.h" #include <fcntl.h>
#include <limits.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <usefull_macros.h>
#include <ASICamera2.h>
Camera ZWOcam; #include "ccdfunc.h"
Focuser ZWOfocus;
Wheel ZWOwheel; extern Camera camera;
extern Focuser focuser;
extern Wheel wheel;
// remove all these after removing stubs!
// VVV
static const int filtermax = 5;
static const float focmaxpos = 10.;
static int filterpos = 0;
static float focuserpos = 1.;
// AAA
static int curbin = 1;
static ASI_BOOL isdark = ASI_FALSE;
static struct{
float maxgain;
float mingain;
float maxbright;
float minbright;
} extrvalues = {0}; // extremal values
static double starttime = 0.; // time when exposure started
static float exptime = 0.; // exposition time
static ASI_CAMERA_INFO caminfo = {0};
// setters and getters of some parameters
static int zwo_setfloat(float f, ASI_CONTROL_TYPE t){
DBG("Try to set float %f, type %d", f, t);
long val = (long) f;
if(ASI_SUCCESS != ASISetControlValue(caminfo.CameraID, t, val, ASI_FALSE)){
DBG("FAILED");
return FALSE;
}
return TRUE;
}
static int zwo_getfloat(float *f, ASI_CONTROL_TYPE t){
if(!f) return FALSE;
long val; ASI_BOOL aut = ASI_FALSE;
if(ASI_SUCCESS != ASIGetControlValue(caminfo.CameraID, t, &val, &aut))
return FALSE;
*f = (float) val;
return TRUE;
}
static int asi_checkcam(){
camera.Ndevices = ASIGetNumOfConnectedCameras();
DBG("found %d ZWO's", camera.Ndevices);
if(camera.Ndevices) return TRUE;
return FALSE;
}
static int campoll(capture_status *st, float *remain){
if(!st) return FALSE;
ASI_EXPOSURE_STATUS s;
if(ASI_SUCCESS != ASIGetExpStatus(caminfo.CameraID, &s)) return FALSE;
switch(s){
case ASI_EXP_IDLE:
*st = CAPTURE_NO;
break;
case ASI_EXP_WORKING:
*st = CAPTURE_PROCESS;
break;
case ASI_EXP_SUCCESS:
*st = CAPTURE_READY;
break;
default: // failed
*st = CAPTURE_ABORTED;
}
if(remain){
float diff = exptime - (dtime() - starttime);
if(diff < 0.) diff = 0.;
*remain = diff;
}
return TRUE;
}
static int camcapt(IMG *ima){
if(!ima || !ima->data) return FALSE;
unsigned char *d = (unsigned char *)ima->data;
long image_size = ima->h * ima->w * 2;
if(ASI_SUCCESS != ASIGetDataAfterExp(caminfo.CameraID, d, image_size)){
printf("Couldn't read exposure data\n");
return 1;
}
return TRUE;
}
static void camcancel(){
ASI_EXPOSURE_STATUS s;
if(ASI_SUCCESS == ASIGetExpStatus(caminfo.CameraID, &s) && s == ASI_EXP_WORKING){
ASIStopExposure(caminfo.CameraID);
}
}
static int setframetype(int l){
if(l) isdark = ASI_FALSE;
else isdark = ASI_TRUE;
return TRUE;
}
static int startcapt(){
camcancel();
//red("ISDARK = %s\n", isdark ? "true" : "false");
if(ASI_SUCCESS == ASIStartExposure(caminfo.CameraID, isdark)){
starttime = dtime();
return TRUE;
}
return FALSE;
}
static void asi_closecam(){
FNAME();
if(caminfo.CameraID){
ASICloseCamera(caminfo.CameraID);
caminfo.CameraID = 0;
}
}
static int setdevno(int n){
if(n > camera.Ndevices - 1 || n < 0) return FALSE;
asi_closecam();
if(ASI_SUCCESS != ASIGetCameraProperty(&caminfo, n)) return FALSE;
DBG("Camera #%d, name: %s, ID: %d", n, caminfo.Name, caminfo.CameraID);
DBG("WxH: %ldx%ld, %s", caminfo.MaxWidth, caminfo.MaxHeight, caminfo.IsColorCam == ASI_TRUE ? "color" : "monochrome");
DBG("Pixel size: %1.1f mkm; gain: %1.2f e/ADU", caminfo.PixelSize, caminfo.ElecPerADU);
#ifdef EBUG
int *sup = caminfo.SupportedBins;
while(*sup){
green("Supported bin: %d\n", *sup++);
}
#endif
camera.pixX = camera.pixY = (float)caminfo.PixelSize / 1e6; // um -> m
camera.array = (frameformat){.w = caminfo.MaxWidth, .h = caminfo.MaxHeight, .xoff = 0, .yoff = 0};
camera.field = camera.array; // initial setup (will update later)
if(ASI_SUCCESS != ASIOpenCamera(caminfo.CameraID)){
WARNX("Can't open device for camera %s", caminfo.Name);
return FALSE;
}
if(ASI_SUCCESS != ASIInitCamera(caminfo.CameraID)){
WARNX("Can't init device for camera %s", caminfo.Name);
asi_closecam();
return FALSE;
}
// get binning
int imtype;
if(ASI_SUCCESS == ASIGetROIFormat(caminfo.CameraID, &camera.field.w, &camera.field.h, &curbin, &imtype)){
ASIGetStartPos(caminfo.CameraID, &camera.field.xoff, &camera.field.yoff);
DBG("FIELD: %dx%d, offset %dx%d, binning %d", camera.field.w, camera.field.h, camera.field.xoff, camera.field.yoff, curbin);
}
int ncontrols = 0;
if(ASI_SUCCESS == ASIGetNumOfControls(caminfo.CameraID, &ncontrols)){
ASI_CONTROL_CAPS asicon;
for(int i = 0; i < ncontrols; ++i){
if(ASI_SUCCESS == ASIGetControlCaps(caminfo.CameraID, i, &asicon)){
#ifdef EBUG
green("Control #%d: '%s' ", i, asicon.Name);
#endif
long val;
ASI_BOOL aut;
if(ASI_SUCCESS == ASIGetControlValue(caminfo.CameraID, asicon.ControlType, &val, &aut)){
#ifdef EBUG
printf("curval: %ld%s, ", val, aut ? " (auto)": "");
#endif
switch(asicon.ControlType){ // get extremal values of brightness and gain
case ASI_GAIN:
extrvalues.maxgain = (float) asicon.MaxValue;
extrvalues.mingain = (float) asicon.MinValue;
break;
case ASI_BRIGHTNESS:
extrvalues.maxbright = (float) asicon.MaxValue;
extrvalues.minbright = (float) asicon.MinValue;
break;
default:
break;
}
}
#ifdef EBUG
printf("min/max: %ld/%ld; def: %ld, writeable: %d, descr: %s\n",
asicon.MinValue, asicon.MaxValue, asicon.DefaultValue, asicon.IsWritable,
asicon.Description);
#endif
}
}
}
return TRUE;
}
static int camsetbrig(float b){
if(b < extrvalues.minbright || b > extrvalues.maxbright) return FALSE;
return zwo_setfloat(b, ASI_BRIGHTNESS);
}
static int camgetbrig(float *b){
if(!b) return FALSE;
return zwo_getfloat(b, ASI_BRIGHTNESS);
}
static int camsetexp(float t){
if(!zwo_setfloat(t*1e6, ASI_EXPOSURE)) return FALSE;
exptime = t;
return TRUE;
}
static int camsetgain(float g){
if(g < extrvalues.mingain || g > extrvalues.maxgain) return FALSE;
return zwo_setfloat(g, ASI_GAIN);
}
static int camgetgain(float *g){
if(!g) return FALSE;
return zwo_getfloat(g, ASI_GAIN);
}
static int camsett(float t){
if(!zwo_setfloat(1., ASI_FAN_ON)){
DBG("Can't set fan on");
return FALSE;
}
float f;
if(zwo_getfloat(&f, ASI_FAN_ON)){
DBG("FAN: %g", f);
}
if(!zwo_setfloat(t, ASI_TARGET_TEMP)){
DBG("Can't set target temperature");
return FALSE;
}
if(zwo_getfloat(&f, ASI_TARGET_TEMP)){
DBG("Ttarg = %g", f);
}
if(!zwo_setfloat(1., ASI_COOLER_ON)){
DBG("Can't set cooler on");
return FALSE;
}
if(!zwo_getfloat(&f, ASI_COOLER_ON)) return FALSE;
DBG("COOLERON = %g", f);
usleep(100000);
double t0 = dtime();
float c, p, tn;
while(dtime() - t0 < 10.){
green("%.1f", dtime()-t0);
zwo_getfloat(&f, ASI_FAN_ON);
zwo_getfloat(&t, ASI_TARGET_TEMP);
zwo_getfloat(&c, ASI_COOLER_ON);
zwo_getfloat(&tn, ASI_TEMPERATURE);
zwo_getfloat(&p, ASI_COOLER_POWER_PERC);
printf("fan: %g, t: %g, cooler: %g, perc: %g, tnow: %g\n", f, t, c, p, tn/10.);
if(f > 0.) break;
usleep(100000);
}
return TRUE;
}
static int camgett(float *t){
if(!t) return FALSE;
float curt;
if(!zwo_getfloat(&curt, ASI_TEMPERATURE)) return FALSE;
*t = curt / 10.;
return TRUE;
}
// get Tbody & Thot unsupported
static int gett(_U_ float *t){
return FALSE;
}
static int camsetbin(int h, int v){
if(h != v) return FALSE;
if(zwo_setfloat(1., ASI_HARDWARE_BIN)){
curbin = h;
return TRUE;
}
return FALSE;
}
// unsupported, but return TRUE if have mechanical shutter
static int camshutter(_U_ shutter_op s){
if(!caminfo.MechanicalShutter) return FALSE;
return TRUE;
}
// set ROI
static int camsetgeom(frameformat *f){ // w,h, xoff, yoff
if(!f) return FALSE;
int imtype;
DBG("w: %g, h: %g, bin: %d", (double)f->w / curbin, (double)f->h / curbin, curbin);
if(ASI_SUCCESS != ASISetROIFormat(caminfo.CameraID, f->w/curbin, f->h/curbin, curbin, ASI_IMG_RAW16)){
DBG(_("Can't set geometry"));
return FALSE;
}
if(ASI_SUCCESS != ASIGetROIFormat(caminfo.CameraID, &f->w, &f->h, &curbin, &imtype)){
DBG(_("Can't get geometry"));
return FALSE;
}
DBG("w=%d, h=%d, bin=%d", f->w, f->h, curbin);
if(ASI_SUCCESS != ASISetStartPos(caminfo.CameraID, f->xoff, f->yoff)){
DBG("Can't set start pos");
return FALSE;
}
if(ASI_SUCCESS != ASIGetStartPos(caminfo.CameraID, &f->xoff, &f->yoff)){
DBG("Can't get start pos");
return FALSE;
}
camera.geometry = *f;
return TRUE;
}
static int camgetnam(char *n, int l){
strncpy(n, caminfo.Name, l);
return TRUE;
}
static int camgmg(float *mg){ // get max gain
if(mg) *mg = extrvalues.maxgain;
return TRUE;
}
static int camggl(frameformat *max, frameformat *step){ // get geometry limits
if(max) *max = camera.array;
if(step) *step = (frameformat){1,1,1,1};
return TRUE;
}
static int camgetbin(int *binh, int *binv){
if(binh) *binh = curbin;
if(binv) *binv = curbin;
return TRUE;
}
static int setfspd(int spd){ // set fast speed (0..3): 0 - 40% bandwidthovrl, 3 - 100%
float bw = 40.;
if(spd > 2) bw = 100.;
else if(spd > 0) bw += 20. * spd;
DBG("set BANDWIDTH to %g", bw);
if(ASI_SUCCESS != zwo_setfloat(bw, ASI_BANDWIDTHOVERLOAD)){
DBG("Can't set");
return FALSE;
}
return TRUE;
}
static int camgetio(_U_ int *io){ // not supported
return FALSE;
}
static int camfan(_U_ fan_speed spd){ // not supported
return TRUE;
}
/* --------------- FOCUSER --------------- */
static int focsetpos(_U_ int a, float n){
if(n < 0. || n > focmaxpos) return FALSE;
focuserpos = n;
return TRUE;
}
static int fochome(_U_ int a){
focuserpos = 0.;
return TRUE;
}
static int focgetnam(char *n, int l){
strncpy(n, "Dummy focuser", l);
return TRUE;
}
static int focpos(float *p){
if(p) *p = focuserpos;
return TRUE;
}
static int focMp(float *p){
if(p) *p = focmaxpos;
return TRUE;
}
static int focmp(float *p){
if(p) *p = 0.;
return TRUE;
}
/* --------------- WHEEL --------------- */
static int whlsetpos(int n){
if(n > filtermax || n < 0) return FALSE;
filterpos = n;
return TRUE;
}
static int whlgetpos(int *n){
if(n) *n = filterpos;
return TRUE;
}
static int whlgmp(int *n){
if(n) *n = filtermax;
return TRUE;
}
static int whlgetnam(char *n, int l){
strncpy(n, "Dummy filter wheel", l);
return TRUE;
}
static int stub(){
return FALSE;
}
static void vstub(){
FNAME();
return;
}
static int istub(_U_ int N){
return TRUE;
}
/*
* Global objects: camera, focuser and wheel
*/
__attribute__ ((visibility("default"))) Camera camera = {
.check = asi_checkcam,
.close = asi_closecam,
.pollcapture = campoll,
.capture = camcapt,
.cancel = camcancel,
.startexposition = startcapt,
// setters:
.setDevNo = setdevno,
.setbrightness = camsetbrig,
.setexp = camsetexp,
.setgain = camsetgain,
.setT = camsett,
.setbin = camsetbin,
.setnflushes = istub,
.shuttercmd = camshutter,
.confio = istub,
.setio = istub,
.setframetype = setframetype,
.setbitdepth = istub,
.setfastspeed = setfspd,
.setgeometry = camsetgeom,
.setfanspeed = camfan,
// getters:
.getbrightness = camgetbrig,
.getModelName = camgetnam,
.getgain = camgetgain,
.getmaxgain = camgmg,
.getgeomlimits = camggl,
.getTcold = camgett,
.getThot = gett,
.getTbody = gett,
.getbin = camgetbin,
.getio = camgetio,
};
__attribute__ ((visibility("default"))) Focuser focuser = {
.check = stub,
.close = vstub,
// setters:
.setDevNo = setdevno,
.setAbsPos = focsetpos,
.home = fochome,
// getters:
.getModelName = focgetnam,
.getTbody = gett,
.getPos = focpos,
.getMaxPos = focMp,
.getMinPos = focmp,
};
__attribute__ ((visibility("default"))) Wheel wheel = {
.check = stub,
.close = vstub,
// setters
.setDevNo = setdevno,
.setPos = whlsetpos,
// getters
.getModelName = whlgetnam,
.getTbody = gett,
.getPos = whlgetpos,
.getMaxPos = whlgmp,
};

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 ZWOFUNC_H__
#define ZWOFUNC_H__
#include "ccdfunc.h"
extern Camera ZWOcam;
extern Focuser ZWOfocus;
extern Wheel ZWOwheel;
#endif // ZWOFUNC_H__

248
ccdfunc.c
View File

@ -16,20 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <dlfcn.h> // dlopen/close
#include <fitsio.h> #include <fitsio.h>
#include <math.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <time.h>
#include "ccdfunc.h" #include "ccdfunc.h"
#include "cmdlnopts.h" #include "cmdlnopts.h"
#include "dummyfunc.h"
#ifdef USEFLI
#include "flifunc.h"
#endif
#ifdef USEZWO
#include "zwofunc.h"
#endif
#ifdef IMAGEVIEW #ifdef IMAGEVIEW
#include "imageview.h" #include "imageview.h"
#endif #endif
@ -56,6 +53,52 @@ do{ int status = 0; \
#define TMBUFSIZ 40 #define TMBUFSIZ 40
// find plugin
static void *open_plugin(const char *name){
DBG("try to open lib %s", name);
void* dlh = dlopen(name, RTLD_NOLOAD); // library may be already opened
if(!dlh) dlh = dlopen(name, RTLD_NOW);
if(!dlh){
WARNX(_("Can't find plugin %s: %s"), name, dlerror());
return NULL;
}
return dlh;
}
static void *init_focuser(const char *pluginname){
FNAME();
void* dlh = open_plugin(pluginname);
if(!dlh) return NULL;
focuser = (Focuser*) dlsym(dlh, "focuser");
if(!focuser){
WARNX(_("Can't find focuser in plugin %s: %s"), pluginname, dlerror());
return NULL;
}
return dlh;
}
static void *init_camera(const char *pluginname){
FNAME();
void* dlh = open_plugin(pluginname);
if(!dlh) return NULL;
camera = (Camera*) dlsym(dlh, "camera");
if(!camera){
WARNX(_("Can't find camera in plugin %s: %s"), pluginname, dlerror());
return NULL;
}
return dlh;
}
static void *init_wheel(const char *pluginname){
FNAME();
void* dlh = open_plugin(pluginname);
if(!dlh) return NULL;
wheel = (Wheel*) dlsym(dlh, "wheel");
if(!wheel){
WARNX(_("Can't find wheel in plugin %s: %s"), pluginname, dlerror());
return NULL;
}
return dlh;
}
/* /*
static size_t curtime(char *s_time){ // current date/time static size_t curtime(char *s_time){ // current date/time
time_t tm = time(NULL); time_t tm = time(NULL);
@ -102,16 +145,20 @@ static void addrec(fitsfile *f, char *filename){
} }
void saveFITS(IMG *img, char *filename){ void saveFITS(IMG *img, char *filename){
char buff[PATH_MAX]; if(!camera){
WARNX(_("Camera device unknown"));
return;
}
char buff[PATH_MAX], fnam[PATH_MAX];
if(filename == NULL) return; if(filename == NULL) return;
fitserror = 0; fitserror = 0;
if(!check_filename(buff, filename, "fits") && !GP->rewrite){ if(!check_filename(fnam, filename, "fits") && !GP->rewrite){
// îÅ ÍÏÇÕ ÓÏÈÒÁÎÉÔØ ÆÁÊÌ // îÅ ÍÏÇÕ ÓÏÈÒÁÎÉÔØ ÆÁÊÌ
WARNX(_("Can't save file")); WARNX(_("Can't save file"));
}else{ }else{
if(GP->rewrite){ if(GP->rewrite){
DBG("REW"); DBG("REW");
snprintf(buff, PATH_MAX, "!%s.fits", filename); snprintf(fnam, PATH_MAX, "!%s.fits", filename);
} }
} }
int width = img->w, height = img->h; int width = img->w, height = img->h;
@ -124,7 +171,7 @@ void saveFITS(IMG *img, char *filename){
char bufc[FLEN_CARD]; char bufc[FLEN_CARD];
time_t savetime = time(NULL); time_t savetime = time(NULL);
fitsfile *fp; fitsfile *fp;
TRYFITS(fits_create_file, &fp, buff); TRYFITS(fits_create_file, &fp, fnam);
if(fitserror) goto cloerr; if(fitserror) goto cloerr;
TRYFITS(fits_create_img, fp, USHORT_IMG, 2, naxes); TRYFITS(fits_create_img, fp, USHORT_IMG, 2, naxes);
if(fitserror) goto cloerr; if(fitserror) goto cloerr;
@ -143,7 +190,7 @@ void saveFITS(IMG *img, char *filename){
WRITEKEY(fp, TSTRING, "INSTRUME", GP->instrument, "Instrument"); WRITEKEY(fp, TSTRING, "INSTRUME", GP->instrument, "Instrument");
}else }else
WRITEKEY(fp, TSTRING, "INSTRUME", "direct imaging", "Instrument"); WRITEKEY(fp, TSTRING, "INSTRUME", "direct imaging", "Instrument");
snprintf(bufc, FLEN_VALUE, "%.g x %.g", camera->pixX, camera->pixY); snprintf(bufc, FLEN_VALUE, "%g x %g", camera->pixX, camera->pixY);
// PXSIZE / pixel size // PXSIZE / pixel size
WRITEKEY(fp, TSTRING, "PXSIZE", bufc, "Pixel size in m"); WRITEKEY(fp, TSTRING, "PXSIZE", bufc, "Pixel size in m");
snprintf(bufc, FLEN_VALUE, "(%d, %d)(%d, %d)", camera->field.xoff, camera->field.yoff, snprintf(bufc, FLEN_VALUE, "(%d, %d)(%d, %d)", camera->field.xoff, camera->field.yoff,
@ -156,7 +203,8 @@ void saveFITS(IMG *img, char *filename){
if(GP->X0 > -1) WRITEKEY(fp, TINT, "X0", &GP->X0, "Subframe left border"); if(GP->X0 > -1) WRITEKEY(fp, TINT, "X0", &GP->X0, "Subframe left border");
if(GP->Y0 > -1) WRITEKEY(fp, TINT, "Y0", &GP->Y0, "Subframe upper border"); if(GP->Y0 > -1) WRITEKEY(fp, TINT, "Y0", &GP->Y0, "Subframe upper border");
if(GP->objtype) strncpy(bufc, GP->objtype, FLEN_CARD-1); if(GP->objtype) strncpy(bufc, GP->objtype, FLEN_CARD-1);
else sprintf(bufc, "object"); else if(GP->dark) sprintf(bufc, "dark");
else sprintf(bufc, "light");
// IMAGETYP / object, flat, dark, bias, scan, eta, neon, push // IMAGETYP / object, flat, dark, bias, scan, eta, neon, push
WRITEKEY(fp, TSTRING, "IMAGETYP", bufc, "Image type"); WRITEKEY(fp, TSTRING, "IMAGETYP", bufc, "Image type");
// DATAMAX, DATAMIN / Max, min pixel value // DATAMAX, DATAMIN / Max, min pixel value
@ -203,6 +251,10 @@ void saveFITS(IMG *img, char *filename){
if(GP->hbin != 1 || GP->vbin != 1){ if(GP->hbin != 1 || GP->vbin != 1){
snprintf(bufc, 80, "%d x %d", GP->hbin, GP->vbin); snprintf(bufc, 80, "%d x %d", GP->hbin, GP->vbin);
WRITEKEY(fp, TSTRING, "BINNING", bufc, "Binning (hbin x vbin)"); WRITEKEY(fp, TSTRING, "BINNING", bufc, "Binning (hbin x vbin)");
tmpi = GP->hbin;
WRITEKEY(fp, TINT, "XBINNING", &tmpi, "binning factor used on X axis");
tmpi = GP->vbin;
WRITEKEY(fp, TINT, "YBINNING", &tmpi, "binning factor used on Y axis");
} }
// OBSERVER / Observers // OBSERVER / Observers
if(GP->observers){ if(GP->observers){
@ -249,7 +301,7 @@ void saveFITS(IMG *img, char *filename){
TRYFITS(fits_close_file, fp); TRYFITS(fits_close_file, fp);
cloerr: cloerr:
if(fitserror == 0){ if(fitserror == 0){
verbose(1, _("File saved as '%s'"), buff); verbose(1, _("File saved as '%s'"), fnam);
}else{ }else{
WARNX(_("Error saving file")); WARNX(_("Error saving file"));
fitserror = 0; fitserror = 0;
@ -299,26 +351,26 @@ static void calculate_stat(IMG *image){
* Find focusers and work with each of them * Find focusers and work with each of them
*/ */
void focusers(){ void focusers(){
if(!GP->focuserdev){ FNAME();
verbose(3, _("Focuser device not pointed, try to guess")); void *dlh = NULL;
#ifdef USEFLI if(!GP->focuserdev && !GP->commondev){
if(FLIfocus.check()) focuser = &FLIfocus; verbose(3, _("Focuser device not pointed"));
#endif
#ifdef USEZWO
if(ZWOfocus.check()) focuser = &ZWOfocus;
#endif
}else{
if(strcasecmp(GP->cameradev, "dummy") == 0) focuser = &DUMMYfocus;
#ifdef USEFLI
else if(strcasecmp(GP->focuserdev, "fli") == 0) focuser = &FLIfocus;
#endif
#ifdef USEZWO
else if(strcasecmp(GP->focuserdev, "zwo") == 0) focuser = &ZWOfocus;
#endif
}
if(!focuser){
WARNX(_("Focuser not found"));
return; return;
}else{
char *plugin = GP->commondev ? GP->commondev : GP->focuserdev;
if(!(dlh = init_focuser(plugin))) return;
}
if(!focuser->check()){
verbose(3, _("No focusers found"));
focuser = NULL;
return;
}
if(GP->listdevices){
for(int i = 0; i < focuser->Ndevices; ++i){
char modname[256];
focuser->getModelName(modname, 255);
printf("Found focuser #%d: %s\n", i, modname);
}
} }
int num = GP->focdevno; int num = GP->focdevno;
if(num > focuser->Ndevices - 1){ if(num > focuser->Ndevices - 1){
@ -371,6 +423,7 @@ void focusers(){
} }
retn: retn:
focuser->close(); focuser->close();
dlclose(dlh);
focuser = NULL; focuser = NULL;
} }
@ -378,26 +431,26 @@ retn:
* Find wheels and work with each of them * Find wheels and work with each of them
*/ */
void wheels(){ void wheels(){
if(!GP->wheeldev){ FNAME();
verbose(3, _("Wheel device not pointed, try to guess")); void *dlh = NULL;
#ifdef USEFLI if(!GP->wheeldev && !GP->commondev){
if(FLIwheel.check()) wheel = &FLIwheel; verbose(3, _("Wheel device not pointed"));
#endif
#ifdef USEZWO
if(ZWOwheel.check()) wheel = &ZWOwheel;
#endif
}else{
if(strcasecmp(GP->cameradev, "dummy") == 0) wheel = &DUMMYwheel;
#ifdef USEFLI
else if(strcasecmp(GP->wheeldev, "fli") == 0) wheel = &FLIwheel;
#endif
#ifdef USEZWO
else if(strcasecmp(GP->wheeldev, "zwo") == 0) wheel = &ZWOwheel;
#endif
}
if(!wheel){
WARNX(_("Wheel not found"));
return; return;
}else{
char *plugin = GP->commondev ? GP->commondev : GP->wheeldev;
if(!(dlh = init_wheel(plugin))) return;
}
if(!wheel->check()){
verbose(3, _("No wheels found"));
wheel = NULL;
return;
}
if(GP->listdevices){
for(int i = 0; i < wheel->Ndevices; ++i){
char modname[256];
wheel->getModelName(modname, 255);
printf("Found wheel #%d: %s\n", i, modname);
}
} }
int num = GP->whldevno; int num = GP->whldevno;
if(num > wheel->Ndevices - 1){ if(num > wheel->Ndevices - 1){
@ -435,26 +488,29 @@ void wheels(){
WARNX(_("Can't set wheel position %d"), pos); WARNX(_("Can't set wheel position %d"), pos);
retn: retn:
wheel->close(); wheel->close();
dlclose(dlh);
wheel = NULL; wheel = NULL;
} }
/*
static void closeall(){ static void closeall(){
if(camera){camera->close(); camera = NULL;} if(camera){camera->close(); camera = NULL;}
if(focuser){focuser->close(); focuser = NULL;} if(focuser){focuser->close(); focuser = NULL;}
if(wheel){wheel->close(); wheel = NULL;} if(wheel){wheel->close(); wheel = NULL;}
} }*/
static capture_status capt(){ static capture_status capt(){
capture_status cs; capture_status cs;
float tleave, tmpf; float tleave, tmpf;
while(camera->pollcapture(&cs, &tleave)){ while(camera->pollcapture(&cs, &tleave)){
if(cs != CAPTURE_PROCESS) break; if(cs != CAPTURE_PROCESS) break;
verbose(2, _("%.1f seconds till exposition ends"), tleave); if(tleave > 0.1){
if(camera->getTcold(&tmpf)) verbose(1, "CCDTEMP=%.1f", tmpf); verbose(2, _("%.1f seconds till exposition ends"), tleave);
if(camera->getTbody(&tmpf)) verbose(1, "BODYTEMP=%.1f", tmpf); if(camera->getTcold(&tmpf)) verbose(1, "CCDTEMP=%.1f", tmpf);
if(camera->getTbody(&tmpf)) verbose(1, "BODYTEMP=%.1f", tmpf);
}
if(tleave > 6.) sleep(5); if(tleave > 6.) sleep(5);
else if(tleave > 0.9) sleep((int)(tleave+0.99)); else if(tleave > 0.9) sleep((int)(tleave+0.99));
else usleep((int)(1e6*tleave) + 1); else usleep((int)(1e6*tleave) + 100000);
if(!camera) return CAPTURE_ABORTED; if(!camera) return CAPTURE_ABORTED;
} }
return cs; return cs;
@ -464,28 +520,27 @@ static capture_status capt(){
* Find CCDs and work with each of them * Find CCDs and work with each of them
*/ */
void ccds(){ void ccds(){
FNAME();
float tmpf; float tmpf;
int tmpi; int tmpi;
if(!GP->cameradev){ void *dlh = NULL;
verbose(3, _("Camera device not pointed, try to guess")); if(!GP->cameradev && !GP->commondev){
#ifdef USEFLI verbose(3, _("Camera device not pointed"));
if(FLIcam.check()) camera = &FLIcam;
#endif
#ifdef USEZWO
if(ZWOcam.check()) camera = &ZWOcam;
#endif
}else{
if(strcasecmp(GP->cameradev, "dummy") == 0) camera = &DUMMYcam;
#ifdef USEFLI
else if(strcasecmp(GP->cameradev, "fli") == 0) camera = &FLIcam;
#endif
#ifdef USEZWO
else if(strcasecmp(GP->cameradev, "zwo") == 0) camera = &ZWOcam;
#endif
}
if(!camera){
WARNX(_("Camera not found"));
return; return;
}else{
char *plugin = GP->commondev ? GP->commondev : GP->cameradev;
if(!(dlh = init_camera(plugin))) return;
}
if(!camera->check()){
verbose(3, _("No cameras found"));
return;
}
if(GP->listdevices){
for(int i = 0; i < camera->Ndevices; ++i){
char modname[256];
camera->getModelName(modname, 255);
printf("Found camera #%d: %s\n", i, modname);
}
} }
int num = GP->camdevno; int num = GP->camdevno;
if(num > camera->Ndevices - 1){ if(num > camera->Ndevices - 1){
@ -551,12 +606,8 @@ void ccds(){
/*********************** expose control ***********************/ /*********************** expose control ***********************/
// cancel previous exp // cancel previous exp
camera->cancel(); camera->cancel();
int binh = 1, binv = 1;
if(!camera->setbin(GP->hbin, GP->vbin)) if(!camera->setbin(GP->hbin, GP->vbin))
WARNX(_("Can't set binning %dx%d"), GP->hbin, GP->vbin); WARNX(_("Can't set binning %dx%d"), GP->hbin, GP->vbin);
if(!camera->getbin(&binh, &binv))
WARNX(_("Can't get current binning"));
verbose(2, "Binning: %d x %d", binh, binv);
if(GP->fullframe){ if(GP->fullframe){
DBG("FULLFRAME"); DBG("FULLFRAME");
GP->X0 = x0; GP->Y0 = y0; GP->X1 = x1; GP->Y1 = y1; GP->X0 = x0; GP->Y0 = y0; GP->X1 = x1; GP->Y1 = y1;
@ -568,7 +619,7 @@ void ccds(){
if(GP->Y1 == -1) GP->Y1 = y1; if(GP->Y1 == -1) GP->Y1 = y1;
else if(GP->Y1 > y1) GP->Y1 = y1; else if(GP->Y1 > y1) GP->Y1 = y1;
frameformat fmt = {.w = GP->X1 - GP->X0, .h = GP->Y1 - GP->Y0, .xoff = GP->X0, .yoff = GP->Y0}; frameformat fmt = {.w = GP->X1 - GP->X0, .h = GP->Y1 - GP->Y0, .xoff = GP->X0, .yoff = GP->Y0};
int raw_width = fmt.w / binh, raw_height = fmt.h / binv; int raw_width = fmt.w / GP->hbin, raw_height = fmt.h / GP->vbin;
if(!camera->setgeometry(&fmt)) if(!camera->setgeometry(&fmt))
WARNX(_("Can't set given geometry")); WARNX(_("Can't set given geometry"));
verbose(3, "Geometry: off=%d/%d, wh=%d/%d", fmt.xoff, fmt.yoff, fmt.w, fmt.h); verbose(3, "Geometry: off=%d/%d, wh=%d/%d", fmt.xoff, fmt.yoff, fmt.w, fmt.h);
@ -583,11 +634,14 @@ void ccds(){
tmpi = (GP->_8bit) ? 0 : 1; tmpi = (GP->_8bit) ? 0 : 1;
if(!camera->setbitdepth(tmpi)) if(!camera->setbitdepth(tmpi))
WARNX(_("Can't set bit depth")); WARNX(_("Can't set bit depth"));
tmpi = (GP->fast) ? 1 : 0; if(!camera->setfastspeed(GP->fast))
if(!camera->setfastspeed(tmpi))
WARNX(_("Can't set readout speed")); WARNX(_("Can't set readout speed"));
else verbose(1, _("Readout mode: %s"), GP->fast ? "fast" : "normal"); else verbose(1, _("Readout mode: %s"), GP->fast ? "fast" : "normal");
if(!GP->outfile) verbose(1, _("Only show statistics")); if(!GP->outfile) verbose(1, _("Only show statistics"));
if(!camera->getbin(&GP->hbin, &GP->vbin)) // GET binning should be AFTER setgeometry!
WARNX(_("Can't get current binning"));
verbose(2, "Binning: %d x %d", GP->hbin, GP->vbin);
uint16_t *img = MALLOC(uint16_t, raw_width * raw_height); uint16_t *img = MALLOC(uint16_t, raw_width * raw_height);
IMG ima = {.data = img, .w = raw_width, .h = raw_height}; IMG ima = {.data = img, .w = raw_width, .h = raw_height};
@ -606,13 +660,16 @@ void ccds(){
for(int j = 0; j < GP->nframes; ++j){ for(int j = 0; j < GP->nframes; ++j){
// úÁÈ×ÁÔ ËÁÄÒÁ %d\n // úÁÈ×ÁÔ ËÁÄÒÁ %d\n
verbose(1, _("Capture frame %d"), j); verbose(1, _("Capture frame %d"), j);
if(!camera) return; if(!camera->startexposition()){
WARNX(_("Can't start exposition"));
break;
}
if(capt() != CAPTURE_READY){ if(capt() != CAPTURE_READY){
WARNX(_("Can't capture image")); WARNX(_("Can't capture image"));
break; break;
} }
verbose(2, _("Read grabbed image")); verbose(2, _("Read grabbed image"));
if(!camera) return; //if(!camera) return;
if(!camera->capture(&ima)){ if(!camera->capture(&ima)){
WARNX(_("Can't grab image")); WARNX(_("Can't grab image"));
break; break;
@ -628,11 +685,11 @@ void ccds(){
if((mainwin->winevt & WINEVT_PAUSE) == 0) break; if((mainwin->winevt & WINEVT_PAUSE) == 0) break;
if(mainwin->winevt & WINEVT_GETIMAGE){ if(mainwin->winevt & WINEVT_GETIMAGE){
mainwin->winevt &= ~WINEVT_GETIMAGE; mainwin->winevt &= ~WINEVT_GETIMAGE;
if(!camera) return; //if(!camera) return;
if(capt() != CAPTURE_READY){ if(capt() != CAPTURE_READY){
WARNX(_("Can't capture image")); WARNX(_("Can't capture image"));
}else{ }else{
if(!camera) return; //if(!camera) return;
if(!camera->capture(&ima)){ if(!camera->capture(&ima)){
WARNX(_("Can't grab image")); WARNX(_("Can't grab image"));
} }
@ -644,7 +701,7 @@ void ccds(){
} }
usleep(10000); usleep(10000);
} }
} }else break; // stop capturing when window closed
} }
#endif #endif
if(GP->pause_len && j != (GP->nframes - 1)){ if(GP->pause_len && j != (GP->nframes - 1)){
@ -662,18 +719,18 @@ void ccds(){
} }
#ifdef IMAGEVIEW #ifdef IMAGEVIEW
if(GP->showimage){ if(GP->showimage){
if(mainwin) mainwin->winevt |= WINEVT_PAUSE; if((mainwin = getWin())) mainwin->winevt |= WINEVT_PAUSE;
DBG("Waiting"); DBG("Waiting");
while((mainwin = getWin())){ while((mainwin = getWin())){
if(mainwin->killthread) break; //if(mainwin->killthread) break;
if(mainwin->winevt & WINEVT_GETIMAGE){ if(mainwin->winevt & WINEVT_GETIMAGE){
DBG("GRAB"); DBG("GRAB");
mainwin->winevt &= ~WINEVT_GETIMAGE; mainwin->winevt &= ~WINEVT_GETIMAGE;
if(!camera) return; //if(!camera) return;
if(capt() != CAPTURE_READY){ if(capt() != CAPTURE_READY){
WARNX(_("Can't capture image")); WARNX(_("Can't capture image"));
}else{ }else{
if(!camera) return; //if(!camera) return;
if(!camera->capture(&ima)){ if(!camera->capture(&ima)){
WARNX(_("Can't grab image")); WARNX(_("Can't grab image"));
} }
@ -688,9 +745,13 @@ void ccds(){
usleep(10000); usleep(10000);
} }
#endif #endif
DBG("FREE img");
FREE(img); FREE(img);
retn: retn:
DBG("Close cam");
camera->close(); camera->close();
DBG("close dlh");
dlclose(dlh);
camera = NULL; camera = NULL;
} }
@ -698,5 +759,4 @@ void cancel(){
if(camera){ if(camera){
camera->cancel(); camera->cancel();
} }
closeall();
} }

View File

@ -64,6 +64,7 @@ typedef struct{
int (*check)(); // check if the device is available, connect and init int (*check)(); // check if the device is available, connect and init
int Ndevices; // amount of devices found int Ndevices; // amount of devices found
void (*close)(); // disconnect & close device void (*close)(); // disconnect & close device
int (*startexposition)(); // start exposition
int (*pollcapture)(capture_status *st, float *remain);// start or poll capture process, `remain` - time remain (s) int (*pollcapture)(capture_status *st, float *remain);// start or poll capture process, `remain` - time remain (s)
int (*capture)(IMG *ima); // capture an image, struct `ima` should be prepared before int (*capture)(IMG *ima); // capture an image, struct `ima` should be prepared before
void (*cancel)(); // cancel exposition void (*cancel)(); // cancel exposition

View File

@ -10,13 +10,10 @@
#include "cmdlnopts.h" #include "cmdlnopts.h"
static int help; static int help;
static glob_pars G;
glob_pars *GP = NULL; glob_pars *GP = NULL;
// DEFAULTS // DEFAULTS
// default global parameters // default global parameters
glob_pars const Gdefault = { static glob_pars G = {
.objtype = "object",
.instrument = "direct imaging", .instrument = "direct imaging",
.exptime = -1, .exptime = -1,
.nframes = 1, .nframes = 1,
@ -37,9 +34,11 @@ glob_pars const Gdefault = {
* name has_arg flag val type argptr help * name has_arg flag val type argptr help
*/ */
myoption cmdlnopts[] = { myoption cmdlnopts[] = {
{"cameradev", NEED_ARG, NULL, 'C', arg_string, APTR(&G.cameradev), N_("camera device type (fli/zwo/etc)")}, {"plugin" ,NEED_ARG, NULL, 0, arg_string, APTR(&G.commondev), N_("common device plugin (e.g devfli.so)")},
{"focuserdev", NEED_ARG,NULL, 'F', arg_string, APTR(&G.focuserdev),N_("focuser device type (fli/zwo/etc)")}, {"cameradev", NEED_ARG, NULL, 'C', arg_string, APTR(&G.cameradev), N_("camera device plugin (e.g. devfli.so)")},
{"wheeldev", NEED_ARG, NULL, 'W', arg_string, APTR(&G.wheeldev), N_("wheel device type (fli/zwo/etc)")}, {"focuserdev", NEED_ARG,NULL, 'F', arg_string, APTR(&G.focuserdev),N_("focuser device plugin (e.g. devzwo.so)")},
{"wheeldev", NEED_ARG, NULL, 'W', arg_string, APTR(&G.wheeldev), N_("wheel device plugin (e.g. devdummy.so)")},
{"list", NO_ARGS, NULL, 'L', arg_int, APTR(&G.listdevices),N_("list connected devices")},
{"camdevno",NEED_ARG, NULL, 0, arg_int, APTR(&G.camdevno), N_("camera device number (if many: 0, 1, 2 etc)")}, {"camdevno",NEED_ARG, NULL, 0, arg_int, APTR(&G.camdevno), N_("camera device number (if many: 0, 1, 2 etc)")},
{"wheeldevno",NEED_ARG, NULL, 0, arg_int, APTR(&G.whldevno), N_("filter wheel device number (if many: 0, 1, 2 etc)")}, {"wheeldevno",NEED_ARG, NULL, 0, arg_int, APTR(&G.whldevno), N_("filter wheel device number (if many: 0, 1, 2 etc)")},
{"focdevno",NEED_ARG, NULL, 0, arg_int, APTR(&G.focdevno), N_("focuser device number (if many: 0, 1, 2 etc)")}, {"focdevno",NEED_ARG, NULL, 0, arg_int, APTR(&G.focdevno), N_("focuser device number (if many: 0, 1, 2 etc)")},
@ -48,7 +47,7 @@ myoption cmdlnopts[] = {
{"verbose", NO_ARGS, NULL, 'V', arg_none, APTR(&G.verbose), N_("verbose level (each -v increase it)")}, {"verbose", NO_ARGS, NULL, 'V', arg_none, APTR(&G.verbose), N_("verbose level (each -v increase it)")},
{"dark", NO_ARGS, NULL, 'd', arg_int, APTR(&G.dark), N_("not open shutter, when exposing (\"dark frames\")")}, {"dark", NO_ARGS, NULL, 'd', arg_int, APTR(&G.dark), N_("not open shutter, when exposing (\"dark frames\")")},
{"8bit", NO_ARGS, NULL, '8', arg_int, APTR(&G._8bit), N_("run in 8-bit mode")}, {"8bit", NO_ARGS, NULL, '8', arg_int, APTR(&G._8bit), N_("run in 8-bit mode")},
{"fast", NO_ARGS, NULL, 'f', arg_int, APTR(&G.fast), N_("fast (8MHz) readout mode")}, {"fast", NO_ARGS, NULL, 'f', arg_none, APTR(&G.fast), N_("fast (8MHz) readout mode")},
{"set-temp",NEED_ARG, NULL, 't', arg_double, APTR(&G.temperature),N_("set CCD temperature to given value (degr C)")}, {"set-temp",NEED_ARG, NULL, 't', arg_double, APTR(&G.temperature),N_("set CCD temperature to given value (degr C)")},
{"set-fan", NEED_ARG, NULL, 0, arg_int, APTR(&G.fanspeed), N_("set fan speed (0 - off, 1 - low, 2 - high)")}, {"set-fan", NEED_ARG, NULL, 0, arg_int, APTR(&G.fanspeed), N_("set fan speed (0 - off, 1 - low, 2 - high)")},
@ -65,7 +64,7 @@ myoption cmdlnopts[] = {
{"vbin", NEED_ARG, NULL, 'v', arg_int, APTR(&G.vbin), N_("vertical binning to N pixels")}, {"vbin", NEED_ARG, NULL, 'v', arg_int, APTR(&G.vbin), N_("vertical binning to N pixels")},
{"nframes", NEED_ARG, NULL, 'n', arg_int, APTR(&G.nframes), N_("make series of N frames")}, {"nframes", NEED_ARG, NULL, 'n', arg_int, APTR(&G.nframes), N_("make series of N frames")},
{"pause", NEED_ARG, NULL, 'p', arg_int, APTR(&G.pause_len), N_("make pause for N seconds between expositions")}, {"pause", NEED_ARG, NULL, 'p', arg_int, APTR(&G.pause_len), N_("make pause for N seconds between expositions")},
{"exptime", NEED_ARG, NULL, 'x', arg_float, APTR(&G.exptime), N_("set exposure time to given value (ms)")}, {"exptime", NEED_ARG, NULL, 'x', arg_double, APTR(&G.exptime), N_("set exposure time to given value (seconds!)")},
{"X0", NEED_ARG, NULL, 0, arg_int, APTR(&G.X0), N_("frame X0 coordinate (-1 - all with overscan)")}, {"X0", NEED_ARG, NULL, 0, arg_int, APTR(&G.X0), N_("frame X0 coordinate (-1 - all with overscan)")},
{"Y0", NEED_ARG, NULL, 0, arg_int, APTR(&G.Y0), N_("frame Y0 coordinate (-1 - all with overscan)")}, {"Y0", NEED_ARG, NULL, 0, arg_int, APTR(&G.Y0), N_("frame Y0 coordinate (-1 - all with overscan)")},
{"X1", NEED_ARG, NULL, 0, arg_int, APTR(&G.X1), N_("frame X1 coordinate (-1 - all with overscan)")}, {"X1", NEED_ARG, NULL, 0, arg_int, APTR(&G.X1), N_("frame X1 coordinate (-1 - all with overscan)")},
@ -104,8 +103,6 @@ myoption cmdlnopts[] = {
* @return allocated structure with global parameters * @return allocated structure with global parameters
*/ */
glob_pars *parse_args(int argc, char **argv){ glob_pars *parse_args(int argc, char **argv){
void *ptr;
ptr = memcpy(&G, &Gdefault, sizeof(G)); assert(ptr);
// format of help: "Usage: progname [args]\n" // format of help: "Usage: progname [args]\n"
change_helpstring("Usage: %s [args] <output file prefix>\n\n\tWhere args are:\n"); change_helpstring("Usage: %s [args] <output file prefix>\n\n\tWhere args are:\n");
// parse arguments // parse arguments

View File

@ -27,7 +27,8 @@
* here are some typedef's for global data * here are some typedef's for global data
*/ */
typedef struct{ typedef struct{
char *cameradev; // camera device ("fli", "zwo" etc) char *commondev; // common (camera+focuser+wheel) plugin ("devfli.so", "devzwo.so" etc)
char *cameradev; // camera device plugin
char *focuserdev; // focuser ... char *focuserdev; // focuser ...
char *wheeldev; // wheel ... char *wheeldev; // wheel ...
char *objname; // object's name char *objname; // object's name
@ -37,6 +38,7 @@ typedef struct{
char *observers; // observers' names char *observers; // observers' names
char *prog_id; // programm identificator char *prog_id; // programm identificator
char *author; // programm author char *author; // programm author
int listdevices; // list connected devices
int fanspeed; // fan speed: 0-2 int fanspeed; // fan speed: 0-2
int noflush; // turn off bg flushing int noflush; // turn off bg flushing
int camdevno; // camera number (0, 1, 2 etc) int camdevno; // camera number (0, 1, 2 etc)
@ -56,7 +58,7 @@ typedef struct{
int getio; // get value of ioport int getio; // get value of ioport
int setio; // set value of ioport int setio; // set value of ioport
int confio; // configure ioport int confio; // configure ioport
float exptime; // time of exposition in seconds double exptime; // time of exposition in seconds
double temperature; // temperature of CCD double temperature; // temperature of CCD
double gotopos; // move stepper motor of focuser to absolute position double gotopos; // move stepper motor of focuser to absolute position
double addsteps; // move stepper motor of focuser to relative position double addsteps; // move stepper motor of focuser to relative position

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-14 16:21+0300\n" "POT-Creation-Date: 2022-03-01 20:35+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,431 +17,468 @@ msgstr ""
"Content-Type: text/plain; charset=koi8-r\n" "Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: cmdlnopts.c:37
msgid "common device plugin (e.g devfli.so)"
msgstr ""
#: cmdlnopts.c:38
msgid "camera device plugin (e.g. devfli.so)"
msgstr ""
#: cmdlnopts.c:39
msgid "focuser device plugin (e.g. devzwo.so)"
msgstr ""
#: cmdlnopts.c:40 #: cmdlnopts.c:40
msgid "camera device type (fli/zwo/etc)" msgid "wheel device plugin (e.g. devdummy.so)"
msgstr "" msgstr ""
#: cmdlnopts.c:41 #: cmdlnopts.c:41
msgid "focuser device type (fli/zwo/etc)" msgid "list connected devices"
msgstr "" msgstr ""
#: cmdlnopts.c:42 #: cmdlnopts.c:42
msgid "wheel device type (fli/zwo/etc)"
msgstr ""
#: cmdlnopts.c:43
msgid "camera device number (if many: 0, 1, 2 etc)" msgid "camera device number (if many: 0, 1, 2 etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:44 #: cmdlnopts.c:43
msgid "filter wheel device number (if many: 0, 1, 2 etc)" msgid "filter wheel device number (if many: 0, 1, 2 etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:45 #: cmdlnopts.c:44
msgid "focuser device number (if many: 0, 1, 2 etc)" msgid "focuser device number (if many: 0, 1, 2 etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:46 #: cmdlnopts.c:45
msgid "show this help" msgid "show this help"
msgstr "" msgstr ""
#: cmdlnopts.c:47 #: cmdlnopts.c:46
msgid "rewrite output file if exists" msgid "rewrite output file if exists"
msgstr "" msgstr ""
#: cmdlnopts.c:48 #: cmdlnopts.c:47
msgid "verbose level (each -v increase it)" msgid "verbose level (each -v increase it)"
msgstr "" msgstr ""
#: cmdlnopts.c:49 #: cmdlnopts.c:48
msgid "not open shutter, when exposing (\"dark frames\")" msgid "not open shutter, when exposing (\"dark frames\")"
msgstr "" msgstr ""
#: cmdlnopts.c:50 #: cmdlnopts.c:49
msgid "run in 8-bit mode" msgid "run in 8-bit mode"
msgstr "" msgstr ""
#: cmdlnopts.c:51 #: cmdlnopts.c:50
msgid "fast (8MHz) readout mode" msgid "fast (8MHz) readout mode"
msgstr "" msgstr ""
#: cmdlnopts.c:52 #: cmdlnopts.c:51
msgid "set CCD temperature to given value (degr C)" msgid "set CCD temperature to given value (degr C)"
msgstr "" msgstr ""
#: cmdlnopts.c:53 #: cmdlnopts.c:52
msgid "set fan speed (0 - off, 1 - low, 2 - high)" msgid "set fan speed (0 - off, 1 - low, 2 - high)"
msgstr "" msgstr ""
#: cmdlnopts.c:55 #: cmdlnopts.c:54
msgid "program author" msgid "program author"
msgstr "" msgstr ""
#: cmdlnopts.c:56 #: cmdlnopts.c:55
msgid "object type (neon, object, flat etc)" msgid "object type (neon, object, flat etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:57 #: cmdlnopts.c:56
msgid "instrument name" msgid "instrument name"
msgstr "" msgstr ""
#: cmdlnopts.c:58 #: cmdlnopts.c:57
msgid "object name" msgid "object name"
msgstr "" msgstr ""
#: cmdlnopts.c:59 #: cmdlnopts.c:58
msgid "observers' names" msgid "observers' names"
msgstr "" msgstr ""
#: cmdlnopts.c:60 #: cmdlnopts.c:59
msgid "observing program name" msgid "observing program name"
msgstr "" msgstr ""
#: cmdlnopts.c:61 #: cmdlnopts.c:60
msgid "add records to header from given file[s]" msgid "add records to header from given file[s]"
msgstr "" msgstr ""
#: cmdlnopts.c:63 #: cmdlnopts.c:62
msgid "N flushes before exposing (default: 1)" msgid "N flushes before exposing (default: 1)"
msgstr "" msgstr ""
#: cmdlnopts.c:64 #: cmdlnopts.c:63
msgid "horizontal binning to N pixels" msgid "horizontal binning to N pixels"
msgstr "" msgstr ""
#: cmdlnopts.c:65 #: cmdlnopts.c:64
msgid "vertical binning to N pixels" msgid "vertical binning to N pixels"
msgstr "" msgstr ""
#: cmdlnopts.c:66 #: cmdlnopts.c:65
msgid "make series of N frames" msgid "make series of N frames"
msgstr "" msgstr ""
#: cmdlnopts.c:67 #: cmdlnopts.c:66
msgid "make pause for N seconds between expositions" msgid "make pause for N seconds between expositions"
msgstr "" msgstr ""
#: cmdlnopts.c:68 #: cmdlnopts.c:67
msgid "set exposure time to given value (ms)" msgid "set exposure time to given value (seconds!)"
msgstr "" msgstr ""
#: cmdlnopts.c:69 #: cmdlnopts.c:68
msgid "frame X0 coordinate (-1 - all with overscan)" msgid "frame X0 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:70 #: cmdlnopts.c:69
msgid "frame Y0 coordinate (-1 - all with overscan)" msgid "frame Y0 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:71 #: cmdlnopts.c:70
msgid "frame X1 coordinate (-1 - all with overscan)" msgid "frame X1 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:72 #: cmdlnopts.c:71
msgid "frame Y1 coordinate (-1 - all with overscan)" msgid "frame Y1 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:73 #: cmdlnopts.c:72
msgid "grab full frame (with overscans)" msgid "grab full frame (with overscans)"
msgstr "" msgstr ""
#: cmdlnopts.c:75 #: cmdlnopts.c:74
msgid "open shutter" msgid "open shutter"
msgstr "" msgstr ""
#: cmdlnopts.c:76 #: cmdlnopts.c:75
msgid "close shutter" msgid "close shutter"
msgstr "" msgstr ""
#: cmdlnopts.c:77 #: cmdlnopts.c:76
msgid "run exposition on LOW @ pin5 I/O port" msgid "run exposition on LOW @ pin5 I/O port"
msgstr "" msgstr ""
#: cmdlnopts.c:78 #: cmdlnopts.c:77
msgid "run exposition on HIGH @ pin5 I/O port" msgid "run exposition on HIGH @ pin5 I/O port"
msgstr "" msgstr ""
#: cmdlnopts.c:79 #: cmdlnopts.c:78
msgid "get value of I/O port pins" msgid "get value of I/O port pins"
msgstr "" msgstr ""
#: cmdlnopts.c:80 #: cmdlnopts.c:79
msgid "move stepper motor asynchronous" msgid "move stepper motor asynchronous"
msgstr "" msgstr ""
#: cmdlnopts.c:82 #: cmdlnopts.c:81
msgid "set I/O port pins to given value (decimal number, pin1 is LSB)" msgid "set I/O port pins to given value (decimal number, pin1 is LSB)"
msgstr "" msgstr ""
#: cmdlnopts.c:83 #: cmdlnopts.c:82
msgid "" msgid ""
"configure I/O port pins to given value (decimal number, pin1 is LSB, 1 == " "configure I/O port pins to given value (decimal number, pin1 is LSB, 1 == "
"output, 0 == input)" "output, 0 == input)"
msgstr "" msgstr ""
#: cmdlnopts.c:85 #: cmdlnopts.c:84
msgid "move focuser to absolute position, mm" msgid "move focuser to absolute position, mm"
msgstr "" msgstr ""
#: cmdlnopts.c:86 #: cmdlnopts.c:85
msgid "move focuser to relative position, mm" msgid "move focuser to relative position, mm"
msgstr "" msgstr ""
#: cmdlnopts.c:88 #: cmdlnopts.c:87
msgid "set wheel position" msgid "set wheel position"
msgstr "" msgstr ""
#: cmdlnopts.c:91 #: cmdlnopts.c:90
msgid "Display image in OpenGL window" msgid "Display image in OpenGL window"
msgstr "" msgstr ""
#: ccdfunc.c:62
#, c-format
msgid "Can't find plugin %s: %s"
msgstr ""
#: ccdfunc.c:74
#, c-format
msgid "Can't find focuser in plugin %s: %s"
msgstr ""
#: ccdfunc.c:85
#, c-format
msgid "Can't find camera in plugin %s: %s"
msgstr ""
#: ccdfunc.c:96
#, c-format
msgid "Can't find wheel in plugin %s: %s"
msgstr ""
#: ccdfunc.c:149
msgid "Camera device unknown"
msgstr ""
#. Не могу сохранить файл #. Не могу сохранить файл
#: ccdfunc.c:110 #: ccdfunc.c:157
msgid "Can't save file" msgid "Can't save file"
msgstr "" msgstr ""
#: ccdfunc.c:252 #: ccdfunc.c:304
#, c-format #, c-format
msgid "File saved as '%s'" msgid "File saved as '%s'"
msgstr "" msgstr ""
#: ccdfunc.c:254 #: ccdfunc.c:306
msgid "Error saving file" msgid "Error saving file"
msgstr "" msgstr ""
#: ccdfunc.c:292 #: ccdfunc.c:344
#, c-format #, c-format
msgid "Image stat:\n" msgid "Image stat:\n"
msgstr "" msgstr ""
#: ccdfunc.c:303 #: ccdfunc.c:357
msgid "Focuser device not pointed, try to guess" msgid "Focuser device not pointed"
msgstr "" msgstr ""
#: ccdfunc.c:320 #: ccdfunc.c:364
msgid "Focuser not found" msgid "No focusers found"
msgstr "" msgstr ""
#: ccdfunc.c:325 #: ccdfunc.c:377
#, c-format #, c-format
msgid "Found %d focusers, you point number %d" msgid "Found %d focusers, you point number %d"
msgstr "" msgstr ""
#: ccdfunc.c:329 #: ccdfunc.c:381
msgid "Can't set active focuser number" msgid "Can't set active focuser number"
msgstr "" msgstr ""
#: ccdfunc.c:343 #: ccdfunc.c:395
msgid "Can't get focuser limit positions" msgid "Can't get focuser limit positions"
msgstr "" msgstr ""
#: ccdfunc.c:350 #: ccdfunc.c:402
msgid "Can't get current focuser position" msgid "Can't get current focuser position"
msgstr "" msgstr ""
#: ccdfunc.c:364 #: ccdfunc.c:416
#, c-format #, c-format
msgid "Can't set position %g: out of limits [%g, %g]" msgid "Can't set position %g: out of limits [%g, %g]"
msgstr "" msgstr ""
#: ccdfunc.c:368 #: ccdfunc.c:420
msgid "Can't home focuser" msgid "Can't home focuser"
msgstr "" msgstr ""
#: ccdfunc.c:370 #: ccdfunc.c:422
#, c-format #, c-format
msgid "Can't set position %g" msgid "Can't set position %g"
msgstr "" msgstr ""
#: ccdfunc.c:382 #: ccdfunc.c:437
msgid "Wheel device not pointed, try to guess" msgid "Wheel device not pointed"
msgstr "" msgstr ""
#: ccdfunc.c:399 #: ccdfunc.c:444
msgid "Wheel not found" msgid "No wheels found"
msgstr "" msgstr ""
#: ccdfunc.c:404 #: ccdfunc.c:457
#, c-format #, c-format
msgid "Found %d wheels, you point number %d" msgid "Found %d wheels, you point number %d"
msgstr "" msgstr ""
#: ccdfunc.c:408 #: ccdfunc.c:461
msgid "Can't set active wheel number" msgid "Can't set active wheel number"
msgstr "" msgstr ""
#: ccdfunc.c:424 #: ccdfunc.c:477
msgid "Can't get max wheel position" msgid "Can't get max wheel position"
msgstr "" msgstr ""
#: ccdfunc.c:431 #: ccdfunc.c:484
#, c-format #, c-format
msgid "Wheel position should be from 0 to %d" msgid "Wheel position should be from 0 to %d"
msgstr "" msgstr ""
#: ccdfunc.c:435 #: ccdfunc.c:488
#, c-format #, c-format
msgid "Can't set wheel position %d" msgid "Can't set wheel position %d"
msgstr "" msgstr ""
#: ccdfunc.c:452 #: ccdfunc.c:507
#, c-format #, c-format
msgid "%.1f seconds till exposition ends" msgid "%.1f seconds till exposition ends"
msgstr "" msgstr ""
#: ccdfunc.c:470 #: ccdfunc.c:528
msgid "Camera device not pointed, try to guess" msgid "Camera device not pointed"
msgstr "" msgstr ""
#: ccdfunc.c:487 #: ccdfunc.c:535
msgid "Camera not found" msgid "No cameras found"
msgstr "" msgstr ""
#: ccdfunc.c:492 #: ccdfunc.c:547
#, c-format #, c-format
msgid "Found %d cameras, you point number %d" msgid "Found %d cameras, you point number %d"
msgstr "" msgstr ""
#: ccdfunc.c:496 #: ccdfunc.c:551
msgid "Can't set active camera number" msgid "Can't set active camera number"
msgstr "" msgstr ""
#: ccdfunc.c:502 #: ccdfunc.c:557
msgid "Can't set fan speed" msgid "Can't set fan speed"
msgstr "" msgstr ""
#: ccdfunc.c:503 #: ccdfunc.c:558
#, c-format #, c-format
msgid "Set fan speed to %d" msgid "Set fan speed to %d"
msgstr "" msgstr ""
#: ccdfunc.c:508 #: ccdfunc.c:563
#, c-format #, c-format
msgid "Camera model: %s" msgid "Camera model: %s"
msgstr "" msgstr ""
#: ccdfunc.c:509 #: ccdfunc.c:564
#, c-format #, c-format
msgid "Pixel size: %g x %g" msgid "Pixel size: %g x %g"
msgstr "" msgstr ""
#: ccdfunc.c:515 #: ccdfunc.c:570
#, c-format #, c-format
msgid "Full array: %s" msgid "Full array: %s"
msgstr "" msgstr ""
#: ccdfunc.c:518 #: ccdfunc.c:573
#, c-format #, c-format
msgid "Field of view: %s" msgid "Field of view: %s"
msgstr "" msgstr ""
#: ccdfunc.c:521 #: ccdfunc.c:576
#, c-format #, c-format
msgid "Can't set T to %g degC" msgid "Can't set T to %g degC"
msgstr "" msgstr ""
#: ccdfunc.c:528 #: ccdfunc.c:583
#, c-format #, c-format
msgid "Shutter command: %s\n" msgid "Shutter command: %s\n"
msgstr "" msgstr ""
#: ccdfunc.c:530 #: ccdfunc.c:585
#, c-format #, c-format
msgid "Can't run shutter command %s (unsupported?)" msgid "Can't run shutter command %s (unsupported?)"
msgstr "" msgstr ""
#. "Попытка сконфигурировать порт I/O как %d\n" #. "Попытка сконфигурировать порт I/O как %d\n"
#: ccdfunc.c:534 #: ccdfunc.c:589
#, c-format #, c-format
msgid "Try to configure I/O port as %d" msgid "Try to configure I/O port as %d"
msgstr "" msgstr ""
#: ccdfunc.c:536 #: ccdfunc.c:591
msgid "Can't configure (unsupported?)" msgid "Can't configure (unsupported?)"
msgstr "" msgstr ""
#: ccdfunc.c:542 #: ccdfunc.c:597
msgid "Can't get IOport state (unsupported?)" msgid "Can't get IOport state (unsupported?)"
msgstr "" msgstr ""
#. "Попытка записи %d в порт I/O\n" #. "Попытка записи %d в порт I/O\n"
#: ccdfunc.c:546 #: ccdfunc.c:601
#, c-format #, c-format
msgid "Try to write %d to I/O port" msgid "Try to write %d to I/O port"
msgstr "" msgstr ""
#: ccdfunc.c:548 #: ccdfunc.c:603
msgid "Can't set IOport" msgid "Can't set IOport"
msgstr "" msgstr ""
#: ccdfunc.c:556 #: ccdfunc.c:610
#, c-format #, c-format
msgid "Can't set binning %dx%d" msgid "Can't set binning %dx%d"
msgstr "" msgstr ""
#: ccdfunc.c:558 #: ccdfunc.c:624
msgid "Can't get current binning"
msgstr ""
#: ccdfunc.c:573
msgid "Can't set given geometry" msgid "Can't set given geometry"
msgstr "" msgstr ""
#: ccdfunc.c:576 #: ccdfunc.c:627
#, c-format #, c-format
msgid "Can't set %d flushes" msgid "Can't set %d flushes"
msgstr "" msgstr ""
#: ccdfunc.c:579 #: ccdfunc.c:630
#, c-format #, c-format
msgid "Can't set exposure time to %f seconds" msgid "Can't set exposure time to %f seconds"
msgstr "" msgstr ""
#: ccdfunc.c:582 #: ccdfunc.c:633
msgid "Can't change frame type" msgid "Can't change frame type"
msgstr "" msgstr ""
#: ccdfunc.c:585 #: ccdfunc.c:636
msgid "Can't set bit depth" msgid "Can't set bit depth"
msgstr "" msgstr ""
#: ccdfunc.c:588 #: ccdfunc.c:638
msgid "Can't set readout speed" msgid "Can't set readout speed"
msgstr "" msgstr ""
#: ccdfunc.c:589 #: ccdfunc.c:639
#, c-format #, c-format
msgid "Readout mode: %s" msgid "Readout mode: %s"
msgstr "" msgstr ""
#: ccdfunc.c:590 #: ccdfunc.c:640
msgid "Only show statistics" msgid "Only show statistics"
msgstr "" msgstr ""
#: ccdfunc.c:601 #. GET binning should be AFTER setgeometry!
#: ccdfunc.c:642
msgid "Can't get current binning"
msgstr ""
#: ccdfunc.c:655
msgid "Can't open OpenGL window, image preview will be inaccessible" msgid "Can't open OpenGL window, image preview will be inaccessible"
msgstr "" msgstr ""
#. Захват кадра %d\n #. Захват кадра %d\n
#: ccdfunc.c:608 #: ccdfunc.c:662
#, c-format #, c-format
msgid "Capture frame %d" msgid "Capture frame %d"
msgstr "" msgstr ""
#: ccdfunc.c:611 ccdfunc.c:633 ccdfunc.c:674 #: ccdfunc.c:664
msgid "Can't start exposition"
msgstr ""
#: ccdfunc.c:668 ccdfunc.c:690 ccdfunc.c:731
msgid "Can't capture image" msgid "Can't capture image"
msgstr "" msgstr ""
#: ccdfunc.c:614 #: ccdfunc.c:671
msgid "Read grabbed image" msgid "Read grabbed image"
msgstr "" msgstr ""
#: ccdfunc.c:617 ccdfunc.c:637 ccdfunc.c:678 #: ccdfunc.c:674 ccdfunc.c:694 ccdfunc.c:735
msgid "Can't grab image" msgid "Can't grab image"
msgstr "" msgstr ""
#. %d секунд до окончания паузы\n #. %d секунд до окончания паузы\n
#: ccdfunc.c:654 #: ccdfunc.c:711
#, c-format #, c-format
msgid "%d seconds till pause ends\n" msgid "%d seconds till pause ends\n"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@
msgid "" msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n" msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-14 16:21+0300\n" "POT-Creation-Date: 2022-03-01 20:27+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -16,13 +16,13 @@ msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Content-Type: text/plain; charset=koi8-r\n" "Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ccdfunc.c:452 #: ccdfunc.c:507
#, c-format #, c-format
msgid "%.1f seconds till exposition ends" msgid "%.1f seconds till exposition ends"
msgstr "" msgstr ""
#. %d секунд до окончания паузы\n #. %d секунд до окончания паузы\n
#: ccdfunc.c:654 #: ccdfunc.c:711
#, c-format #, c-format
msgid "%d seconds till pause ends\n" msgid "%d seconds till pause ends\n"
msgstr "" msgstr ""
@ -31,56 +31,77 @@ msgstr ""
msgid "Already initialized!" msgid "Already initialized!"
msgstr "" msgstr ""
#: ccdfunc.c:470 #: ccdfunc.c:528
msgid "Camera device not pointed, try to guess" msgid "Camera device not pointed"
msgstr "" msgstr ""
#: ccdfunc.c:508 #: ccdfunc.c:149
msgid "Camera device unknown"
msgstr ""
#: ccdfunc.c:563
#, c-format #, c-format
msgid "Camera model: %s" msgid "Camera model: %s"
msgstr "" msgstr ""
#: ccdfunc.c:487 #: ccdfunc.c:668 ccdfunc.c:690 ccdfunc.c:731
msgid "Camera not found"
msgstr ""
#: ccdfunc.c:611 ccdfunc.c:633 ccdfunc.c:674
msgid "Can't capture image" msgid "Can't capture image"
msgstr "" msgstr ""
#: ccdfunc.c:582 #: ccdfunc.c:633
msgid "Can't change frame type" msgid "Can't change frame type"
msgstr "" msgstr ""
#: ccdfunc.c:536 #: ccdfunc.c:591
msgid "Can't configure (unsupported?)" msgid "Can't configure (unsupported?)"
msgstr "" msgstr ""
#: ccdfunc.c:542 #: ccdfunc.c:85
#, c-format
msgid "Can't find camera in plugin %s: %s"
msgstr ""
#: ccdfunc.c:74
#, c-format
msgid "Can't find focuser in plugin %s: %s"
msgstr ""
#: ccdfunc.c:62
#, c-format
msgid "Can't find plugin %s: %s"
msgstr ""
#: ccdfunc.c:96
#, c-format
msgid "Can't find wheel in plugin %s: %s"
msgstr ""
#: ccdfunc.c:597
msgid "Can't get IOport state (unsupported?)" msgid "Can't get IOport state (unsupported?)"
msgstr "" msgstr ""
#: ccdfunc.c:558 #. GET binning should be AFTER setgeometry!
#: ccdfunc.c:642
msgid "Can't get current binning" msgid "Can't get current binning"
msgstr "" msgstr ""
#: ccdfunc.c:350 #: ccdfunc.c:402
msgid "Can't get current focuser position" msgid "Can't get current focuser position"
msgstr "" msgstr ""
#: ccdfunc.c:343 #: ccdfunc.c:395
msgid "Can't get focuser limit positions" msgid "Can't get focuser limit positions"
msgstr "" msgstr ""
#: ccdfunc.c:424 #: ccdfunc.c:477
msgid "Can't get max wheel position" msgid "Can't get max wheel position"
msgstr "" msgstr ""
#: ccdfunc.c:617 ccdfunc.c:637 ccdfunc.c:678 #: ccdfunc.c:674 ccdfunc.c:694 ccdfunc.c:735
msgid "Can't grab image" msgid "Can't grab image"
msgstr "" msgstr ""
#: ccdfunc.c:368 #: ccdfunc.c:420
msgid "Can't home focuser" msgid "Can't home focuser"
msgstr "" msgstr ""
@ -88,94 +109,98 @@ msgstr ""
msgid "Can't init mutex!" msgid "Can't init mutex!"
msgstr "" msgstr ""
#: ccdfunc.c:601 #: ccdfunc.c:655
msgid "Can't open OpenGL window, image preview will be inaccessible" msgid "Can't open OpenGL window, image preview will be inaccessible"
msgstr "" msgstr ""
#: ccdfunc.c:530 #: ccdfunc.c:585
#, c-format #, c-format
msgid "Can't run shutter command %s (unsupported?)" msgid "Can't run shutter command %s (unsupported?)"
msgstr "" msgstr ""
#. Не могу сохранить файл #. Не могу сохранить файл
#: ccdfunc.c:110 #: ccdfunc.c:157
msgid "Can't save file" msgid "Can't save file"
msgstr "" msgstr ""
#: ccdfunc.c:576 #: ccdfunc.c:627
#, c-format #, c-format
msgid "Can't set %d flushes" msgid "Can't set %d flushes"
msgstr "" msgstr ""
#: ccdfunc.c:548 #: ccdfunc.c:603
msgid "Can't set IOport" msgid "Can't set IOport"
msgstr "" msgstr ""
#: ccdfunc.c:521 #: ccdfunc.c:576
#, c-format #, c-format
msgid "Can't set T to %g degC" msgid "Can't set T to %g degC"
msgstr "" msgstr ""
#: ccdfunc.c:496 #: ccdfunc.c:551
msgid "Can't set active camera number" msgid "Can't set active camera number"
msgstr "" msgstr ""
#: ccdfunc.c:329 #: ccdfunc.c:381
msgid "Can't set active focuser number" msgid "Can't set active focuser number"
msgstr "" msgstr ""
#: ccdfunc.c:408 #: ccdfunc.c:461
msgid "Can't set active wheel number" msgid "Can't set active wheel number"
msgstr "" msgstr ""
#: ccdfunc.c:556 #: ccdfunc.c:610
#, c-format #, c-format
msgid "Can't set binning %dx%d" msgid "Can't set binning %dx%d"
msgstr "" msgstr ""
#: ccdfunc.c:585 #: ccdfunc.c:636
msgid "Can't set bit depth" msgid "Can't set bit depth"
msgstr "" msgstr ""
#: ccdfunc.c:579 #: ccdfunc.c:630
#, c-format #, c-format
msgid "Can't set exposure time to %f seconds" msgid "Can't set exposure time to %f seconds"
msgstr "" msgstr ""
#: ccdfunc.c:502 #: ccdfunc.c:557
msgid "Can't set fan speed" msgid "Can't set fan speed"
msgstr "" msgstr ""
#: ccdfunc.c:573 #: ccdfunc.c:624
msgid "Can't set given geometry" msgid "Can't set given geometry"
msgstr "" msgstr ""
#: ccdfunc.c:370 #: ccdfunc.c:422
#, c-format #, c-format
msgid "Can't set position %g" msgid "Can't set position %g"
msgstr "" msgstr ""
#: ccdfunc.c:364 #: ccdfunc.c:416
#, c-format #, c-format
msgid "Can't set position %g: out of limits [%g, %g]" msgid "Can't set position %g: out of limits [%g, %g]"
msgstr "" msgstr ""
#: ccdfunc.c:588 #: ccdfunc.c:638
msgid "Can't set readout speed" msgid "Can't set readout speed"
msgstr "" msgstr ""
#: ccdfunc.c:435 #: ccdfunc.c:488
#, c-format #, c-format
msgid "Can't set wheel position %d" msgid "Can't set wheel position %d"
msgstr "" msgstr ""
#: ccdfunc.c:664
msgid "Can't start exposition"
msgstr ""
#. Захват кадра %d\n #. Захват кадра %d\n
#: ccdfunc.c:608 #: ccdfunc.c:662
#, c-format #, c-format
msgid "Capture frame %d" msgid "Capture frame %d"
msgstr "" msgstr ""
#: cmdlnopts.c:91 #: cmdlnopts.c:90
msgid "Display image in OpenGL window" msgid "Display image in OpenGL window"
msgstr "" msgstr ""
@ -184,44 +209,40 @@ msgstr ""
msgid "Equalization of histogram: %s" msgid "Equalization of histogram: %s"
msgstr "" msgstr ""
#: ccdfunc.c:254 #: ccdfunc.c:306
msgid "Error saving file" msgid "Error saving file"
msgstr "" msgstr ""
#: ccdfunc.c:518 #: ccdfunc.c:573
#, c-format #, c-format
msgid "Field of view: %s" msgid "Field of view: %s"
msgstr "" msgstr ""
#: ccdfunc.c:252 #: ccdfunc.c:304
#, c-format #, c-format
msgid "File saved as '%s'" msgid "File saved as '%s'"
msgstr "" msgstr ""
#: ccdfunc.c:303 #: ccdfunc.c:357
msgid "Focuser device not pointed, try to guess" msgid "Focuser device not pointed"
msgstr "" msgstr ""
#: ccdfunc.c:320 #: ccdfunc.c:547
msgid "Focuser not found"
msgstr ""
#: ccdfunc.c:492
#, c-format #, c-format
msgid "Found %d cameras, you point number %d" msgid "Found %d cameras, you point number %d"
msgstr "" msgstr ""
#: ccdfunc.c:325 #: ccdfunc.c:377
#, c-format #, c-format
msgid "Found %d focusers, you point number %d" msgid "Found %d focusers, you point number %d"
msgstr "" msgstr ""
#: ccdfunc.c:404 #: ccdfunc.c:457
#, c-format #, c-format
msgid "Found %d wheels, you point number %d" msgid "Found %d wheels, you point number %d"
msgstr "" msgstr ""
#: ccdfunc.c:515 #: ccdfunc.c:570
#, c-format #, c-format
msgid "Full array: %s" msgid "Full array: %s"
msgstr "" msgstr ""
@ -231,174 +252,190 @@ msgstr ""
msgid "Histogram conversion: %s" msgid "Histogram conversion: %s"
msgstr "" msgstr ""
#: ccdfunc.c:292 #: ccdfunc.c:344
#, c-format #, c-format
msgid "Image stat:\n" msgid "Image stat:\n"
msgstr "" msgstr ""
#: cmdlnopts.c:63 #: cmdlnopts.c:62
msgid "N flushes before exposing (default: 1)" msgid "N flushes before exposing (default: 1)"
msgstr "" msgstr ""
#: ccdfunc.c:590 #: ccdfunc.c:535
msgid "No cameras found"
msgstr ""
#: ccdfunc.c:364
msgid "No focusers found"
msgstr ""
#: ccdfunc.c:444
msgid "No wheels found"
msgstr ""
#: ccdfunc.c:640
msgid "Only show statistics" msgid "Only show statistics"
msgstr "" msgstr ""
#: ccdfunc.c:509 #: ccdfunc.c:564
#, c-format #, c-format
msgid "Pixel size: %g x %g" msgid "Pixel size: %g x %g"
msgstr "" msgstr ""
#: ccdfunc.c:614 #: ccdfunc.c:671
msgid "Read grabbed image" msgid "Read grabbed image"
msgstr "" msgstr ""
#: ccdfunc.c:589 #: ccdfunc.c:639
#, c-format #, c-format
msgid "Readout mode: %s" msgid "Readout mode: %s"
msgstr "" msgstr ""
#: ccdfunc.c:503 #: ccdfunc.c:558
#, c-format #, c-format
msgid "Set fan speed to %d" msgid "Set fan speed to %d"
msgstr "" msgstr ""
#: ccdfunc.c:528 #: ccdfunc.c:583
#, c-format #, c-format
msgid "Shutter command: %s\n" msgid "Shutter command: %s\n"
msgstr "" msgstr ""
#. "Попытка сконфигурировать порт I/O как %d\n" #. "Попытка сконфигурировать порт I/O как %d\n"
#: ccdfunc.c:534 #: ccdfunc.c:589
#, c-format #, c-format
msgid "Try to configure I/O port as %d" msgid "Try to configure I/O port as %d"
msgstr "" msgstr ""
#. "Попытка записи %d в порт I/O\n" #. "Попытка записи %d в порт I/O\n"
#: ccdfunc.c:546 #: ccdfunc.c:601
#, c-format #, c-format
msgid "Try to write %d to I/O port" msgid "Try to write %d to I/O port"
msgstr "" msgstr ""
#: ccdfunc.c:382 #: ccdfunc.c:437
msgid "Wheel device not pointed, try to guess" msgid "Wheel device not pointed"
msgstr "" msgstr ""
#: ccdfunc.c:399 #: ccdfunc.c:484
msgid "Wheel not found"
msgstr ""
#: ccdfunc.c:431
#, c-format #, c-format
msgid "Wheel position should be from 0 to %d" msgid "Wheel position should be from 0 to %d"
msgstr "" msgstr ""
#: cmdlnopts.c:61 #: cmdlnopts.c:60
msgid "add records to header from given file[s]" msgid "add records to header from given file[s]"
msgstr "" msgstr ""
#: cmdlnopts.c:43 #: cmdlnopts.c:42
msgid "camera device number (if many: 0, 1, 2 etc)" msgid "camera device number (if many: 0, 1, 2 etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:40 #: cmdlnopts.c:38
msgid "camera device type (fli/zwo/etc)" msgid "camera device plugin (e.g. devfli.so)"
msgstr "" msgstr ""
#: cmdlnopts.c:76 #: cmdlnopts.c:75
msgid "close shutter" msgid "close shutter"
msgstr "" msgstr ""
#: cmdlnopts.c:83 #: cmdlnopts.c:37
msgid "common device plugin (e.g devfli.so)"
msgstr ""
#: cmdlnopts.c:82
msgid "configure I/O port pins to given value (decimal number, pin1 is LSB, " msgid "configure I/O port pins to given value (decimal number, pin1 is LSB, "
"1 == output, 0 == input)" "1 == output, 0 == input)"
msgstr "" msgstr ""
#: cmdlnopts.c:51 #: cmdlnopts.c:50
msgid "fast (8MHz) readout mode" msgid "fast (8MHz) readout mode"
msgstr "" msgstr ""
#: cmdlnopts.c:44 #: cmdlnopts.c:43
msgid "filter wheel device number (if many: 0, 1, 2 etc)" msgid "filter wheel device number (if many: 0, 1, 2 etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:45 #: cmdlnopts.c:44
msgid "focuser device number (if many: 0, 1, 2 etc)" msgid "focuser device number (if many: 0, 1, 2 etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:41 #: cmdlnopts.c:39
msgid "focuser device type (fli/zwo/etc)" msgid "focuser device plugin (e.g. devzwo.so)"
msgstr "" msgstr ""
#: cmdlnopts.c:69 #: cmdlnopts.c:68
msgid "frame X0 coordinate (-1 - all with overscan)" msgid "frame X0 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:71 #: cmdlnopts.c:70
msgid "frame X1 coordinate (-1 - all with overscan)" msgid "frame X1 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:70 #: cmdlnopts.c:69
msgid "frame Y0 coordinate (-1 - all with overscan)" msgid "frame Y0 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:72 #: cmdlnopts.c:71
msgid "frame Y1 coordinate (-1 - all with overscan)" msgid "frame Y1 coordinate (-1 - all with overscan)"
msgstr "" msgstr ""
#: cmdlnopts.c:79 #: cmdlnopts.c:78
msgid "get value of I/O port pins" msgid "get value of I/O port pins"
msgstr "" msgstr ""
#: cmdlnopts.c:73 #: cmdlnopts.c:72
msgid "grab full frame (with overscans)" msgid "grab full frame (with overscans)"
msgstr "" msgstr ""
#: cmdlnopts.c:64 #: cmdlnopts.c:63
msgid "horizontal binning to N pixels" msgid "horizontal binning to N pixels"
msgstr "" msgstr ""
#: cmdlnopts.c:57 #: cmdlnopts.c:56
msgid "instrument name" msgid "instrument name"
msgstr "" msgstr ""
#: cmdlnopts.c:67 #: cmdlnopts.c:41
msgid "make pause for N seconds between expositions" msgid "list connected devices"
msgstr "" msgstr ""
#: cmdlnopts.c:66 #: cmdlnopts.c:66
msgid "make pause for N seconds between expositions"
msgstr ""
#: cmdlnopts.c:65
msgid "make series of N frames" msgid "make series of N frames"
msgstr "" msgstr ""
#: cmdlnopts.c:85 #: cmdlnopts.c:84
msgid "move focuser to absolute position, mm" msgid "move focuser to absolute position, mm"
msgstr "" msgstr ""
#: cmdlnopts.c:86 #: cmdlnopts.c:85
msgid "move focuser to relative position, mm" msgid "move focuser to relative position, mm"
msgstr "" msgstr ""
#: cmdlnopts.c:80 #: cmdlnopts.c:79
msgid "move stepper motor asynchronous" msgid "move stepper motor asynchronous"
msgstr "" msgstr ""
#: cmdlnopts.c:49 #: cmdlnopts.c:48
msgid "not open shutter, when exposing (\"dark frames\")" msgid "not open shutter, when exposing (\"dark frames\")"
msgstr "" msgstr ""
#: cmdlnopts.c:58 #: cmdlnopts.c:57
msgid "object name" msgid "object name"
msgstr "" msgstr ""
#: cmdlnopts.c:56 #: cmdlnopts.c:55
msgid "object type (neon, object, flat etc)" msgid "object type (neon, object, flat etc)"
msgstr "" msgstr ""
#: cmdlnopts.c:59 #: cmdlnopts.c:58
msgid "observers' names" msgid "observers' names"
msgstr "" msgstr ""
#: cmdlnopts.c:60 #: cmdlnopts.c:59
msgid "observing program name" msgid "observing program name"
msgstr "" msgstr ""
@ -410,62 +447,62 @@ msgstr ""
msgid "on" msgid "on"
msgstr "" msgstr ""
#: cmdlnopts.c:75 #: cmdlnopts.c:74
msgid "open shutter" msgid "open shutter"
msgstr "" msgstr ""
#: cmdlnopts.c:55 #: cmdlnopts.c:54
msgid "program author" msgid "program author"
msgstr "" msgstr ""
#: cmdlnopts.c:47 #: cmdlnopts.c:46
msgid "rewrite output file if exists" msgid "rewrite output file if exists"
msgstr "" msgstr ""
#: cmdlnopts.c:78 #: cmdlnopts.c:77
msgid "run exposition on HIGH @ pin5 I/O port" msgid "run exposition on HIGH @ pin5 I/O port"
msgstr "" msgstr ""
#: cmdlnopts.c:77 #: cmdlnopts.c:76
msgid "run exposition on LOW @ pin5 I/O port" msgid "run exposition on LOW @ pin5 I/O port"
msgstr "" msgstr ""
#: cmdlnopts.c:50 #: cmdlnopts.c:49
msgid "run in 8-bit mode" msgid "run in 8-bit mode"
msgstr "" msgstr ""
#: cmdlnopts.c:52 #: cmdlnopts.c:51
msgid "set CCD temperature to given value (degr C)" msgid "set CCD temperature to given value (degr C)"
msgstr "" msgstr ""
#: cmdlnopts.c:82 #: cmdlnopts.c:81
msgid "set I/O port pins to given value (decimal number, pin1 is LSB)" msgid "set I/O port pins to given value (decimal number, pin1 is LSB)"
msgstr "" msgstr ""
#: cmdlnopts.c:68 #: cmdlnopts.c:67
msgid "set exposure time to given value (ms)" msgid "set exposure time to given value (seconds!)"
msgstr "" msgstr ""
#: cmdlnopts.c:53 #: cmdlnopts.c:52
msgid "set fan speed (0 - off, 1 - low, 2 - high)" msgid "set fan speed (0 - off, 1 - low, 2 - high)"
msgstr "" msgstr ""
#: cmdlnopts.c:88 #: cmdlnopts.c:87
msgid "set wheel position" msgid "set wheel position"
msgstr "" msgstr ""
#: cmdlnopts.c:46 #: cmdlnopts.c:45
msgid "show this help" msgid "show this help"
msgstr "" msgstr ""
#: cmdlnopts.c:48 #: cmdlnopts.c:47
msgid "verbose level (each -v increase it)" msgid "verbose level (each -v increase it)"
msgstr "" msgstr ""
#: cmdlnopts.c:65 #: cmdlnopts.c:64
msgid "vertical binning to N pixels" msgid "vertical binning to N pixels"
msgstr "" msgstr ""
#: cmdlnopts.c:42 #: cmdlnopts.c:40
msgid "wheel device type (fli/zwo/etc)" msgid "wheel device plugin (e.g. devdummy.so)"
msgstr "" msgstr ""