From 38dee72b04ecba4c71661aa2056a3bdad12ba21c Mon Sep 17 00:00:00 2001 From: Edward Emelianov Date: Tue, 11 Apr 2023 11:08:28 +0300 Subject: [PATCH] fixed basler bug; still have bugs with on-the-fly size changing --- BASLER_cameras/basler.c | 8 +++++--- locale/ru/messages.po | 6 +++--- locale/ru/ru.po | 6 +++--- main.c | 1 - server.c | 4 +++- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/BASLER_cameras/basler.c b/BASLER_cameras/basler.c index 8ec791b..bf82be5 100644 --- a/BASLER_cameras/basler.c +++ b/BASLER_cameras/basler.c @@ -253,12 +253,14 @@ static int geometrylimits(frameformat *max, frameformat *step){ int64_values i; if(!getInt("Width", &i)) return FALSE; max->w = i.max; step->w = i.incr; + max->xoff = i.max; step->xoff = i.incr; if(!getInt("Height", &i)) return FALSE; max->h = i.max; step->h = i.incr; - if(!getInt("OffsetX", &i)) return FALSE; - max->xoff = i.max; step->xoff = i.incr; - if(!getInt("OffsetY", &i)) return FALSE; max->yoff = i.max; step->yoff = i.incr; + if(!getInt("OffsetX", &i)) return FALSE; + max->w -= i.max; + if(!getInt("OffsetY", &i)) return FALSE; + max->h -= i.max; return TRUE; } diff --git a/locale/ru/messages.po b/locale/ru/messages.po index bf77e35..4baf3f3 100644 --- a/locale/ru/messages.po +++ b/locale/ru/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-11 08:58+0300\n" +"POT-Creation-Date: 2023-04-11 10:00+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -478,12 +478,12 @@ msgstr "" msgid "Can't set brightness to %g" msgstr "" -#: ccdfunc.c:725 server.c:234 +#: ccdfunc.c:725 server.c:236 #, c-format msgid "Can't set binning %dx%d" msgstr "" -#: ccdfunc.c:737 server.c:235 +#: ccdfunc.c:737 server.c:237 msgid "Can't set given geometry" msgstr "" diff --git a/locale/ru/ru.po b/locale/ru/ru.po index 05a73e4..6590d3a 100644 --- a/locale/ru/ru.po +++ b/locale/ru/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" - "POT-Creation-Date: 2023-04-11 08:58+0300\n" + "POT-Creation-Date: 2023-04-11 09:57+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -162,7 +162,7 @@ msgstr " msgid "Can't set active wheel number" msgstr "Не могу установить номер активного колеса" -#: ccdfunc.c:725 server.c:234 +#: ccdfunc.c:725 server.c:236 #, c-format msgid "Can't set binning %dx%d" msgstr "Не могу установить биннинг %dx%d" @@ -190,7 +190,7 @@ msgstr " msgid "Can't set gain to %g" msgstr "Не могу установить Gain в %g" -#: ccdfunc.c:737 server.c:235 +#: ccdfunc.c:737 server.c:237 msgid "Can't set given geometry" msgstr "Не могу установить геометрию" diff --git a/main.c b/main.c index b098c9a..91e780f 100644 --- a/main.c +++ b/main.c @@ -68,7 +68,6 @@ void signals(int signo){ } int main(int argc, char **argv){ - char *self = strdup(argv[0]); initial_setup(); #if defined GETTEXT_PACKAGE && defined LOCALEDIR printf("GETTEXT_PACKAGE=" GETTEXT_PACKAGE ", LOCALEDIR=" LOCALEDIR "\n"); diff --git a/server.c b/server.c index 1fe5872..865aac2 100644 --- a/server.c +++ b/server.c @@ -224,8 +224,10 @@ static int camdevini(int n){ frameformat step; camera->getgeomlimits(&frmformatmax, &step); curformat = frmformatmax; - DBG("\n\nGeometry format (offx/offy) w/h: (%d/%d) %d/%d", curformat.xoff, curformat.yoff, + DBG("\n\nGeometry format max (offx/offy) w/h: (%d/%d) %d/%d", curformat.xoff, curformat.yoff, curformat.w, curformat.h); +// curformat.w -= curformat.xoff; +// curformat.h -= curformat.yoff; curformat.xoff = 0; curformat.yoff = 0; if(GP->hbin < 1) GP->hbin = 1;