void qhy5ii_init() { qhy_core_init(); qhy_core_getendp()->info = 0xC2; qhy_core_getendp()->read = 0xC0; qhy_core_getendp()->write = 0x40; qhy_core_getendp()->iread = 0x81; qhy_core_getendp()->iwrite = 0x01; qhy_core_getendp()->bulk = 0x82; qhy_core_getendp()->aux = 0; qhy_core_getreq()->sendregs = 0xB5; qhy_core_getreq()->startexp = 0xB3; qhy_core_getreq()->setdc201 = 0; qhy_core_getreq()->getdc201 = 0; qhy_core_getreq()->shutter = 0; qhy_core_getreq()->wheel = 0; qhy_core_getcampars()->vid = VENDOR_ID; qhy_core_getcampars()->pid = PRODUCT_ID; qhy_core_getcampars()->shortexp = SHORTEXP; qhy_core_getcampars()->buftimes = 0; qhy_core_getcampars()->buftimef = 0; // Positively no tec imgcam_get_tecp()->istec = 0; // 0 = Not driveable tec or no tec 1 = Driveable tec imgcam_get_tecp()->tecerr = 0; // Error reading / setting tec; imgcam_get_tecp()->tecpwr = 0; // Basically 0 - tecmax imgcam_get_tecp()->tecmax = 0; // 0-255 imgcam_get_tecp()->tecauto = 0; // 0 = Manual, 1 = Seek target temp imgcam_get_tecp()->tectemp = 0.; // Only meaningful when tecauto = 1; imgcam_get_tecp()->settemp = 0.; // Only meaningful when tecauto = 1; strcpy(imgcam_get_camui()->binstr, ""); strcpy(imgcam_get_camui()->roistr, ""); /// Combo box values list, keep N-<desc> format. Just translate <desc> strcpy(imgcam_get_camui()->spdstr, C_("camio","0-Slow|1-Fast:0")); strcpy(imgcam_get_camui()->ampstr, ""); strcpy(imgcam_get_camui()->modstr, "0:255:5:50"); /// Descriptiopn for "mode" combo box strcpy(imgcam_get_camui()->moddsc, C_("camio","Usb bus speed")); strcpy(imgcam_get_camui()->snrstr, ""); strcpy(imgcam_get_camui()->bppstr, ""); strcpy(imgcam_get_camui()->byrstr, "-1"); strcpy(imgcam_get_camui()->tecstr, ""); strcpy(imgcam_get_camui()->whlstr, ""); imgcam_get_expar()->bitpix = 8; imgcam_get_expar()->bytepix = 1; imgcam_get_expar()->tsize = 0; imgcam_get_expar()->edit = 0; }
void qhy9_init() { qhy_core_init(); qhy_core_getendp()->info = 0xC2; qhy_core_getendp()->read = 0xC0; qhy_core_getendp()->write = 0x40; qhy_core_getendp()->iread = 0x81; qhy_core_getendp()->iwrite = 0x01; qhy_core_getendp()->bulk = 0x86; qhy_core_getendp()->aux = 0; qhy_core_getreq()->sendregs = 0xB5; qhy_core_getreq()->startexp = 0xB3; qhy_core_getreq()->setdc201 = 0XC6; qhy_core_getreq()->getdc201 = 0XC5; qhy_core_getreq()->shutter = 0XC7; qhy_core_getreq()->wheel = 0xC1; qhy_core_getcampars()->vid = VENDOR_ID; qhy_core_getcampars()->pid = PRODUCT_ID; qhy_core_getcampars()->shortexp = SHORTEXP; qhy_core_getcampars()->buftimes = 12000; qhy_core_getcampars()->buftimef = 4000; // Positively yess tec imgcam_get_tecp()->istec = 1; // 0 = Not driveable tec or no tec 1 = Driveable tec imgcam_get_tecp()->tecerr = 0; // Error reading / setting tec; imgcam_get_tecp()->tecpwr = 5; // Basically 0 - tecmax, value here is used for initial set on camera open imgcam_get_tecp()->tecmax = 255; // 0-255 imgcam_get_tecp()->tecauto = 0; // 0 = Manual, 1 = Seek target temp imgcam_get_tecp()->tectemp = 0.; // Only meaningful when tecauto = 1; imgcam_get_tecp()->settemp = 0.; // Only meaningful when tecauto = 1; imgcam_get_camui()->hasgain = 1; imgcam_get_camui()->hasoffset = 1; strcpy(imgcam_get_camui()->binstr, "1x1|2x2|3x3|4x4:0"); /// Capture size values list, just translate "Full" (frame) strcpy(imgcam_get_camui()->roistr, C_("camio","Full|512x512|256x256:0")); /// Combo box values list, keep N-<desc> format. Just translate <desc> strcpy(imgcam_get_camui()->spdstr, C_("camio","0-Slow|1-Fast:0")); strcpy(imgcam_get_camui()->ampstr, C_("camio","0-AmpOff|1-AmpOn|2-Auto:2")); strcpy(imgcam_get_camui()->modstr, C_("camio","0-Light|1-Dark:0")); /// Descriptiopn for "mode" combo box strcpy(imgcam_get_camui()->moddsc, C_("camio","Light/Dark mode")); strcpy(imgcam_get_camui()->snrstr, ""); strcpy(imgcam_get_camui()->bppstr, "2-16Bit|:0"); strcpy(imgcam_get_camui()->byrstr, "0"); strcpy(imgcam_get_camui()->tecstr, "0:255:1:2"); strcpy(imgcam_get_camui()->whlstr, C_("camio","5-Positions|6-Positions|7-Positions|8-Positions:0")); // Shutter imgcam_get_camui()->shutterMode = 1; // Header values imgcam_get_camui()->pszx = 5.40; imgcam_get_camui()->pszy = 5.40; imgcam_get_expar()->bitpix = 16; imgcam_get_expar()->bytepix = 2; imgcam_get_expar()->tsize = 0; imgcam_get_expar()->edit = 0; }
void imgcam_init() { static int first_time = 1; qhy_core_init(); if (!first_time) { #ifdef HAVE_SBIG sbig_core_close(); #endif } #ifdef HAVE_SBIG sbig_core_init(imgBasePath); #endif #ifdef HAVE_URVC urvc_core_init(); #endif if (databuffer[0] != NULL) { free(databuffer[0]); databuffer[0] = NULL; } if (databuffer[1] != NULL) { free(databuffer[1]); databuffer[1] = NULL; } camid = 0; if (first_time) { cammodel = (char*)realloc(cammodel, 64); cammsg = (char*)realloc(cammsg, 1024); first_time = 0; } cammodel[0] = '\0'; cammsg[0] = '\0'; imgcam_init_list(0); strcpy(imgcam_get_camui()->binstr, ""); strcpy(imgcam_get_camui()->roistr, ""); strcpy(imgcam_get_camui()->spdstr, ""); strcpy(imgcam_get_camui()->modstr, ""); strcpy(imgcam_get_camui()->moddsc, ""); // This is the current label for multi-purpose modstr strcpy(imgcam_get_camui()->ampstr, ""); strcpy(imgcam_get_camui()->snrstr, ""); strcpy(imgcam_get_camui()->bppstr, ""); strcpy(imgcam_get_camui()->byrstr, "0"); strcpy(imgcam_get_camui()->tecstr, ""); strcpy(imgcam_get_camui()->whlstr, ""); imgcam_get_camui()->shutterMode = 0; imgcam_get_camui()->pszx = 0; imgcam_get_camui()->pszy = 0; // Positively no tec imgcam_get_tecp()->istec = 0; // 0 = Not driveable tec or no tec 1 = Driveable tec imgcam_get_tecp()->tecerr = 0; // Error reading / setting tec; imgcam_get_tecp()->tecpwr = 0; // Basically 0 - tecmax imgcam_get_tecp()->tecmax = 0; // 0-255 imgcam_get_tecp()->tecauto = 0; // 0 = Manual, 1 = Seek target temp imgcam_get_tecp()->tectemp = 0.; // Only meaningful when tecauto = 1; imgcam_get_tecp()->settemp = 0.; // Only meaningful when tecauto = 1; imgcam_get_tecp()->tecedit = 0; loaded = 0; connected = 0; }