diff --git a/APOGEE_cameras/apogee.c b/APOGEE_cameras/apogee.c index 043a549..545e2e9 100644 --- a/APOGEE_cameras/apogee.c +++ b/APOGEE_cameras/apogee.c @@ -46,7 +46,7 @@ static double expt[2] = {0.}; // min/max exposition time static double exptime = 0.; // actual exposition time static double tstart = 0.; // exposure start time static char whynot[BUFSIZ]; // temporary buffer for error messages -static int imW = 0, imH = 0; // size of output image +static int imW = 0, imH = 0; // size of output image (BINNED!) static int pid = -1, vid = -1; static int isexposuring = 0; @@ -224,8 +224,8 @@ static int setgeometry(cc_frameformat *f){ if(ApnGlueSetExpGeom(f->w, f->h, ow, 0, hbin, vbin, f->xoff, f->yoff, &imW, &imH, whynot)){ WARNX("Can't set geometry: %s", whynot); - imW = f->w; - imH = f->h; + imW = f->w / hbin; + imH = f->h / vbin; }else{ camera.geometry = *f; } diff --git a/BASLER_cameras/basler.c b/BASLER_cameras/basler.c index a76f0a9..4ad251e 100644 --- a/BASLER_cameras/basler.c +++ b/BASLER_cameras/basler.c @@ -345,7 +345,8 @@ static int pollcapt(cc_capture_status *st, float *remain){ static int capture(cc_IMG *ima){ FNAME(); //double __t0 = dtime(); - if(!ima || !ima->data || !imgBuf || !isopened || !cc_fiximage(bitdepth, camera.geometry.w, camera.geometry.h, ima)) return FALSE; + if(!ima || !ima->data || !imgBuf || !isopened || + !cc_fiximage(bitdepth, camera.geometry.w / curhbin, camera.geometry.h / curvbin, ima)) return FALSE; static int toohot = FALSE; float_values f; //TIMESTAMP("start capt"); diff --git a/CMakeLists.txt b/CMakeLists.txt index ef2a547..0b46f71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,7 +168,7 @@ add_custom_command( DEPENDS ru_file_updated ) -add_custom_command( +add_custom_target( OUTPUT ru_file_updated COMMAND [ -f ${RU_FILE} ] && ${GETTEXT_MSGMERGE_EXECUTABLE} -Uis ${RU_FILE} ${PO_FILE} || cp ${PO_FILE} ${RU_FILE} COMMAND ${CMAKE_COMMAND} -E touch ru_file_updated @@ -176,3 +176,5 @@ add_custom_command( ) add_custom_target(MO_FILE ALL DEPENDS ${MO_FILE}) +add_dependencies(${PROJ} MO_FILE) +install(FILES ${MO_FILE} DESTINATION "${LOCALEDIR}/ru/LC_MESSAGES") diff --git a/Dummy_cameras/dummyfunc.c b/Dummy_cameras/dummyfunc.c index 5e6aec5..a0363b5 100644 --- a/Dummy_cameras/dummyfunc.c +++ b/Dummy_cameras/dummyfunc.c @@ -71,7 +71,8 @@ static int startexp(){ static int camcapt(cc_IMG *ima){ static int n = 0; - if(!ima || !ima->data || !cc_fiximage(bitpix, camera.geometry.w, camera.geometry.h, ima)) return FALSE; + if(!ima || !ima->data || + !cc_fiximage(bitpix, camera.geometry.w / curhbin, camera.geometry.h / curvbin, ima)) return FALSE; #ifdef EBUG double t0 = sl_dtime(); #endif diff --git a/FLI_cameras/flifunc.c b/FLI_cameras/flifunc.c index 9baf044..8d893e0 100644 --- a/FLI_cameras/flifunc.c +++ b/FLI_cameras/flifunc.c @@ -462,7 +462,8 @@ retn: static int fli_capt(cc_IMG *ima){ int bitpix = is16bit ? 16 : 8; - if(!ima || !ima->data || !cc_fiximage(bitpix, camera.geometry.w, camera.geometry.h, ima)) return FALSE; + if(!ima || !ima->data || + !cc_fiximage(bitpix, camera.geometry.w / curhbin, camera.geometry.h / curvbin, ima)) return FALSE; for(int row = 0; row < ima->h; row++){ void *ptr = NULL; if(is16bit) ptr = (void*)(((uint16_t*)ima->data) + row * ima->w); diff --git a/TOUPCAM_cameras/toupcam.c b/TOUPCAM_cameras/toupcam.c index d60ff2d..ee26629 100644 --- a/TOUPCAM_cameras/toupcam.c +++ b/TOUPCAM_cameras/toupcam.c @@ -313,17 +313,18 @@ static int startexp(){ static int camcapt(cc_IMG *ima){ TCHECK(); int bitpix = toupcam.bytepix * 8; - if(!ima || !ima->data || !toupcam.data || !cc_fiximage(bitpix, camera.geometry.w, camera.geometry.h, ima)) return FALSE; + int realw = camera.geometry.w / toupcam.curbin, realh = camera.geometry.h / toupcam.curbin; + if(!ima || !ima->data || !toupcam.data || !cc_fiximage(bitpix, realw, realh, ima)) return FALSE; //DBG("LOCK"); pthread_mutex_lock(&toupcam.mutex); size_t fullsz = ima->w * ima->h * toupcam.bytepix; if(toupcam.imsz != fullsz){ if(toupcam.imsz < fullsz) fullsz = toupcam.imsz; - int realw = camera.geometry.w / toupcam.curbin; if(ima->w != realw) ima->w = realw; ima->h = fullsz / realw / toupcam.bytepix; WARNX("Asked image size (%zd) not equal real (%zd); set w=%d, h=%d!", ima->w * ima->h * toupcam.bytepix, toupcam.imsz, ima->w, ima->h); + ima->bytelen = fullsz; } memcpy(ima->data, toupcam.data, fullsz); toupcam.lastcapno = toupcam.imseqno; diff --git a/locale/ru/LC_MESSAGES/ccd_capture.mo b/locale/ru/LC_MESSAGES/ccd_capture.mo index f08471e..f0d3c5c 100644 Binary files a/locale/ru/LC_MESSAGES/ccd_capture.mo and b/locale/ru/LC_MESSAGES/ccd_capture.mo differ diff --git a/locale/ru/ru.po b/locale/ru/ru.po index d611122..a9a5f52 100644 --- a/locale/ru/ru.po +++ b/locale/ru/ru.po @@ -235,7 +235,7 @@ msgstr " #: main.c:129 msgid "Can't run in client and server modes simultaneously" -msgstr "" +msgstr "Не могу одновременно запустить клиент и сервер" #: ccdfunc.c:684 #, c-format @@ -499,12 +499,12 @@ msgstr " #: cmdlnopts.c:123 msgid "INET command socket port (omit if use on same host with server)" -msgstr "" +msgstr "порт командного сетевого сокета" #: cmdlnopts.c:124 #, fuzzy msgid "INET image socket port (default: port+1)" -msgstr "порт локального сетевого сокета передачи изображения" +msgstr "порт сетевого сокета передачи изображения" #: ccdfunc.c:90 msgid "Image not saved: neither filename nor filename prefix pointed"