Subversion Repositories seema-scanner

Rev

Rev 157 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 157 Rev 207
Line 1... Line 1...
1
#include "CameraPointGrey.h"
1
#include "CameraPointGrey.h"
2
#include <cstring>
2
#include <cstring>
-
 
3
#include <assert.h>
3
 
4
 
4
//#include <sys/ioctl.h>
5
//#include <sys/ioctl.h>
5
//#include <linux/usbdevice_fs.h>
6
//#include <linux/usbdevice_fs.h>
6
 
7
 
7
void PrintError(FlyCapture2::Error error){
8
void PrintError(FlyCapture2::Error error){
-
 
9
    //TODOassert(false);
8
    error.PrintErrorTrace();
10
    error.PrintErrorTrace();
9
}
11
}
10
 
12
 
11
vector<CameraInfo> CameraPointGrey::getCameraList(){
13
vector<CameraInfo> CameraPointGrey::getCameraList(){
12
    
14
    
Line 242... Line 244...
242
    config.grabTimeout = 1000;
244
    config.grabTimeout = 1000;
243
    error = cam.SetConfiguration(&config);
245
    error = cam.SetConfiguration(&config);
244
    if (error != FlyCapture2::PGRERROR_OK)
246
    if (error != FlyCapture2::PGRERROR_OK)
245
        PrintError(error);
247
        PrintError(error);
246
 
248
 
-
 
249
    // TODO this segfaults if another instance is running
-
 
250
    if(!capturing)
247
    error = cam.StartCapture();
251
        error = cam.StartCapture();
248
    if (error != FlyCapture2::PGRERROR_OK)
252
    if (error != FlyCapture2::PGRERROR_OK)
249
        PrintError(error);
253
        PrintError(error);
250
 
254
 
251
    capturing = true;
255
    capturing = true;
252
}
256
}