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

@@ -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);