fixed some errors

This commit is contained in:
eddyem
2015-02-17 12:39:02 +03:00
parent 4776ef09d1
commit 8ff7276b60
7 changed files with 154 additions and 40 deletions

View File

@@ -8,6 +8,10 @@ To compile and install wrapper make:
[5] You can run test applications: ./test will make testing connection to your camera and
./test_wheel will make test connection to your wheel, increasing its current position.
Define -DEBUG=1 to see debug info
After installing cd to apogee_control working directory and compile&install apogee_control.
@@ -19,4 +23,3 @@ APOGEE_ALTAF
APOGEE_ASPEN
APOGEE_QUAD
If you wanna see debugging information, add -DEBUG to cmake options

View File

@@ -129,6 +129,25 @@ CamParams *getCamParams(std::string & msg){
return ∥
}
/**
* return camera info
* Don't forget to call FREE!!!
* @param pid, vid - device PID and VID
*/
char *ApnGlueGetInfo(int *pid, int *vid){
if(pid || vid){
uint16_t v = 1, p = 2, d = 3;
alta->GetUsbVendorInfo(v, p, d);
if(pid) *pid = p;
if(vid) *vid = v;
}
std::string str = alta->GetInfo();
char *writable = new char[str.size() + 1];
std::copy(str.begin(), str.end(), writable);
writable[str.size()] = '\0';
return writable;
}
/**
* Open camera device and assign it to variable <alta>
* IT DON'T WORK WITH MULTIPLE CAMERAS SIMULTANEOUSLY!
@@ -588,6 +607,8 @@ int ApnGlueReadPixels(unsigned short *buf, int nbuf, char whynot[]){
return altaerr;
}
/*
******************************** FILTER WHEEL ********************************
*/

View File

@@ -153,6 +153,7 @@ int ApnGlueExpDone();
void ApnGlueExpAbort(void);
int ApnGlueStopExposure();
int ApnGlueReadPixels(unsigned short *buf, int nbuf, char whynot[]);
char *ApnGlueGetInfo(int *pid, int *vid);
// Wheel
int ApnGlueWheelOpen(unsigned int id, Apn_Filter type);