Open myier opened 6 years ago
Your compiler is not finding libusb.h
Firstly, check that you have libusb.h installed. Most likely it will be in either /usr/include/libusb.h or /usr/include/libusb-1.0/libusb.h. If it is the latter then you'll need to edit qhycam.h and change the path to libusb.h. I had to edit cyusb.h as well.
As I do not work for QHY I cannot answer your other questions.
Please wait,
the last delivery was somehow corrupted, I will release a new one during 1-2 days.
There will be libusb stuff, of course. Yesterday, I talked about some stuff related to QHY128C
with Dr. Qiu H, owner of QHYCCD company.
Sorry, for that troubles.
Regards,
Jan
---------- Původní e-mail ---------- Od: Nikki notifications@github.com Komu: qhyccd-lzr/QHYCCD_Linux_New QHYCCD_Linux_New@noreply.github.com Datum: 7. 7. 2018 15:54:20 Předmět: Re: [qhyccd-lzr/QHYCCD_Linux_New] Sample does not compile (#8) " Your compiler is not finding libusb.h
Firstly, check that you have libusb.h installed. Most likely it will be in either /usr/include/libusb.h or /usr/include/libusb-1.0/libusb.h. If it is the latter then you'll need to edit qhycam.h and change the path to libusb. h. I had to edit cyusb.h as well.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/qhyccd-lzr/QHYCCD_Linux_New/issues/8#issuecomment-403217326) , or mute the thread (https://github.com/notifications/unsubscribe-auth/AE-NVBwcgeZSXWeRWlgxwkXkXbEdnlRTks5uEL2GgaJpZM4VBu8Q) . "
I used the following workaround on Ubuntu 16.04 with SDK v2.0.7:
$ CPLUS_INCLUDE_PATH=/usr/include/libusb-1.0/ make
The new version, 2.0.10, does not fix this issue, at least in its x86_64.release variant. I know this is not difficult to fix, ${LIBUSB_1_INCLUDE_DIRS} and the like are missing.
The udev rules file also contains error by the way, on my system the SYSFS keyword doesn't exist in this context (line 34).
It would be nice to have a bit more documentation and the answers to my first question please: this is supposed to be a replacement for the other QHYCCD SDK if I understand correctly, is this supposed to be a stable version yet? Should it be integrated in capture software already? Is there documentation about what has changed between the old version and this new SDK, and also between revisions of this SDK, like release notes? Regards
This is a bit strange, maybe Arch linux uses a bit different udev rules ? I just asked QHYCCD company how to solve that problem, so could you email me privately to my astrosoft@email.cz, please ? Thanks, Jan
I don't think it's strange, in your CMakeLists.txt you use USB_1_INCLUDE_DIR instead of LIBUSB_1_INCLUDE_DIRS, this is a cmake convention. As for the line with SYSFS in the udev rules, it's the only line with it so I guess this is an error and can be replaced by ATTRS like the other lines. I don't know the history is udev, but in systemd-udevd, SYSFS does not appear to exist.
Can you answer to the other questions please?
Here are list of drivers:
https://www.qhyccd.com/html/test_version/
jan
---------- Původní e-mail ---------- Od: bodhan notifications@github.com Komu: qhyccd-lzr/QHYCCD_Linux_New QHYCCD_Linux_New@noreply.github.com Datum: 29. 3. 2019 4:31:07 Předmět: Re: [qhyccd-lzr/QHYCCD_Linux_New] Sample does not compile (#8) " Hello,I couldn't get GetQHYCCDLiveFrame when using QHY174 for live frame mode on a pi3b+, but single frame mode was fine.Error number from GetQHYCCDLiveFrame:-1.Here is my code:
unsigned short ImgData = NULL; qhyccd_handle camhandle = NULL;
int connectCCD(); int capAndSend(); void closeCCD();
int main() { int ret = connectCCD(); if(ret != 0) { printf("Connect CCD failed!"); }
capAndSend();
closeCCD();
return 0;
}
int connectCCD() { int num = 0; int ret = QHYCCD_ERROR; char id[32]; unsigned int w, h, bpp, channels; double chipw, chiph, pixelw, pixelh;
ret = InitQHYCCDResource();
num = ScanQHYCCD();
ret = GetQHYCCDId(0,id);
camhandle = OpenQHYCCD(id);
ret = SetQHYCCDStreamMode(camhandle,1);
ret = InitQHYCCD(camhandle);
if(ret == QHYCCD_SUCCESS)
{
printf("Init CCD success!\n");
}
else
{
printf("Init CCD failed!\n");
return 1;
}
SetQHYCCDBitsMode(camhandle,16);
GetQHYCCDChipInfo(camhandle,&chipw,&chiph,&w,&h,&pixelw,&pixelh,&bpp);
printf("max res %dx%d,depth:%d\n",w,h,bpp);
SetQHYCCDParam(camhandle,CONTROL_WBR,188);
SetQHYCCDParam(camhandle,CONTROL_WBG,128);
SetQHYCCDParam(camhandle,CONTROL_WBB,200);
SetQHYCCDParam(camhandle,CONTROL_USBTRAFFIC,8);
SetQHYCCDParam(camhandle,CONTROL_SPEED,2);
SetQHYCCDParam(camhandle,CONTROL_EXPOSURE,128000);
ret = BeginQHYCCDLive(camhandle);
if(ret == QHYCCD_SUCCESS)
{
printf("live start success!\n");
}
else
{
printf("live start failed!\n");
return 1;
}
return 0;
}
int capAndSend() { unsigned int w, h, bpp, channels; int ret = GetQHYCCDLiveFrame(camhandle,&w,&h,&bpp,&channels,(unsigned char*) ImgData); if(ret == QHYCCD_SUCCESS) { printf("Get live frame success!w:%d,h:%d,bpp:%d,channels:%d\n",w,h,bpp, channels); } else { printf("Get live frame failed!%d\n",ret); return 1; } return 0; }
void closeCCD() { delete(ImgData); if(camhandle) { StopQHYCCDLive(camhandle); CloseQHYCCD(camhandle); ReleaseQHYCCDResource(); } }
— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/qhyccd-lzr/QHYCCD_Linux_New/issues/8#issuecomment-477853601) , or mute the thread (https://github.com/notifications/unsubscribe-auth/AE-NVCOnhi1virafx1G5cnrwozaK-CNnks5vbYj1gaJpZM4VBu8Q) . "
Hello, I think there's a problem in the makefile, cmake finds libusb but make doesn't:
$ cmake ../testapp/SingleFrameMode/ -- The C compiler identification is GNU 8.1.1 -- The CXX compiler identification is GNU 8.1.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done PROJECT_SOURCE_DIR: /tmp/qhyccdsdk-v2.0.7-Linux-Debian-Ubuntu-x86_64/testapp/SingleFrameMode -- Found libusb-1.0: -- Includes : /usr/include/libusb-1.0 -- Libraries: /usr/lib/libusb-1.0.so -- Performing Test ERROR_NAME_COMPILE -- Performing Test ERROR_NAME_COMPILE - Success -- Configuring done -- Generating done -- Build files have been written to: /tmp/qhyccdsdk-v2.0.7-Linux-Debian-Ubuntu-x86_64/build
$ make Scanning dependencies of target SingleFrameMode [ 50%] Building CXX object CMakeFiles/SingleFrameMode.dir/SingleFrameMode.cpp.o In file included from /tmp/qhyccdsdk-v2.0.7-Linux-Debian-Ubuntu-x86_64/testapp/SingleFrameMode/../../include/qhyccd.h:27, from /tmp/qhyccdsdk-v2.0.7-Linux-Debian-Ubuntu-x86_64/testapp/SingleFrameMode/SingleFrameMode.cpp:6: /tmp/qhyccdsdk-v2.0.7-Linux-Debian-Ubuntu-x86_64/testapp/SingleFrameMode/../../include/qhycam.h:44:10: fatal error: libusb.h: No such file or directory
include
compilation terminated. make[2]: *** [CMakeFiles/SingleFrameMode.dir/build.make:63: CMakeFiles/SingleFrameMode.dir/SingleFrameMode.cpp.o] Error 1
This is with Arch Linux. Also, could you clarify a few things for me please, maybe add them in the README?
Thank you