Last active
March 27, 2018 09:40
-
-
Save lubosz/12cc48592a4f8251476e53ce6dcc48d5 to your computer and use it in GitHub Desktop.
xime sync sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// xiSample.cpp : program that captures 10 images and finish | |
// | |
#include "stdafx.h" | |
#ifdef WIN32 | |
#include "xiApi.h" // Windows | |
#else | |
#include <m3api/xiApi.h> // Linux, OSX | |
#include <unistd.h> | |
#endif | |
#include <memory.h> | |
#include <time.h> | |
#define HandleResult(res,place) if (res!=XI_OK) {printf("Error after %s (%d)\n",place,res);goto finish;} | |
#define SUPPORT_FOR_2_CAMERAS 1 | |
#define SUPPORT_FOR_3_CAMERAS 0 | |
#define SUPPORT_FOR_4_CAMERAS 0 | |
#define SUPPORT_FOR_5_CAMERAS 0 | |
#define SUPPORT_FOR_6_CAMERAS 0 | |
#define SUPPORT_FOR_7_CAMERAS 0 | |
#define SUPPORT_FOR_8_CAMERAS 0 | |
#define SUPPORT_FOR_9_CAMERAS 0 | |
#define SUPPORT_FOR_10_CAMERAS 0 | |
#define SUPPORT_FOR_11_CAMERAS 0 | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
// image1 buffer | |
XI_IMG image1; | |
memset(&image1,0,sizeof(image1)); | |
image1.size = sizeof(XI_IMG); | |
HANDLE xiH1 = NULL; | |
// image2 buffer | |
XI_IMG image2; | |
memset(&image2,0,sizeof(image2)); | |
image2.size = sizeof(XI_IMG); | |
HANDLE xiH2 = NULL; | |
// image3 buffer | |
XI_IMG image3; | |
memset(&image3, 0, sizeof(image3)); | |
image3.size = sizeof(XI_IMG); | |
HANDLE xiH3 = NULL; | |
// image4 buffer | |
XI_IMG image4; | |
memset(&image4, 0, sizeof(image4)); | |
image4.size = sizeof(XI_IMG); | |
HANDLE xiH4 = NULL; | |
// image5 buffer | |
XI_IMG image5; | |
memset(&image5, 0, sizeof(image5)); | |
image5.size = sizeof(XI_IMG); | |
HANDLE xiH5 = NULL; | |
// image6 buffer | |
XI_IMG image6; | |
memset(&image6, 0, sizeof(image6)); | |
image6.size = sizeof(XI_IMG); | |
HANDLE xiH6 = NULL; | |
// image7 buffer | |
XI_IMG image7; | |
memset(&image7, 0, sizeof(image7)); | |
image7.size = sizeof(XI_IMG); | |
HANDLE xiH7 = NULL; | |
// image8 buffer | |
XI_IMG image8; | |
memset(&image8, 0, sizeof(image8)); | |
image8.size = sizeof(XI_IMG); | |
HANDLE xiH8 = NULL; | |
// image9 buffer | |
XI_IMG image9; | |
memset(&image9, 0, sizeof(image9)); | |
image9.size = sizeof(XI_IMG); | |
HANDLE xiH9 = NULL; | |
// image10 buffer | |
XI_IMG image10; | |
memset(&image10, 0, sizeof(image10)); | |
image10.size = sizeof(XI_IMG); | |
HANDLE xiH10 = NULL; | |
// image11 buffer | |
XI_IMG image11; | |
memset(&image11, 0, sizeof(image11)); | |
image11.size = sizeof(XI_IMG); | |
HANDLE xiH11 = NULL; | |
XI_RETURN stat = XI_OK; | |
char serial_number1[100]=""; | |
char serial_number2[100]=""; | |
int retry = 2000; | |
int EXPOSURE = 5000; | |
// Get number of camera devices | |
DWORD dwNumberOfDevices = 0; | |
stat = xiGetNumberDevices(&dwNumberOfDevices); | |
HandleResult(stat,"xiGetNumberDevices (no camera found)"); | |
// open cameras | |
printf("Opening Master\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "40690659", &xiH1); | |
//stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "23790359", &xiH1); | |
HandleResult(stat,"xiOpenDevice1"); | |
if (SUPPORT_FOR_2_CAMERAS) | |
{ | |
if (dwNumberOfDevices < 2) | |
{ | |
printf("At least 2 cameras expected. Found %d\n",dwNumberOfDevices); | |
goto finish; | |
} | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "40690059", &xiH2); // Camera 2 | |
//stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "11790459", &xiH2); | |
HandleResult(stat,"xiOpenDevice2"); | |
} //SUPPORT_FOR_2_CAMERAS | |
if (SUPPORT_FOR_3_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "40690259", &xiH3); // Camera 3 | |
//stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "23790259", &xiH3); | |
HandleResult(stat, "xiOpenDevice3"); | |
} | |
if (SUPPORT_FOR_4_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "11790659", &xiH4); // Camera 4 | |
HandleResult(stat, "xiOpenDevice4"); | |
} | |
if (SUPPORT_FOR_5_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "40690859", &xiH5); // Camera 5 | |
HandleResult(stat, "xiOpenDevice5"); | |
} | |
if (SUPPORT_FOR_6_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "40690759", &xiH6); // Camera 6 | |
HandleResult(stat, "xiOpenDevice6"); | |
} | |
if (SUPPORT_FOR_7_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "11790759", &xiH7); // Camera 7 | |
HandleResult(stat, "xiOpenDevice7"); | |
} | |
if (SUPPORT_FOR_8_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "11790559", &xiH8); // Camera 8 | |
HandleResult(stat, "xiOpenDevice8"); | |
} | |
if (SUPPORT_FOR_9_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "40690459", &xiH9); // Camera 9 | |
HandleResult(stat, "xiOpenDevice9"); | |
} | |
if (SUPPORT_FOR_10_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "11790259", &xiH10); // Camera 10 | |
HandleResult(stat, "xiOpenDevice10"); | |
} | |
if (SUPPORT_FOR_11_CAMERAS) { | |
printf("Opening Slave\n"); | |
stat = xiOpenDeviceBy(XI_OPEN_BY_SN, "11790159", &xiH11); // Camera 11 | |
HandleResult(stat, "xiOpenDevice11"); | |
} | |
// set trigger mode on camera1 - as master | |
printf("Setting parameters for camera 1\n"); | |
stat = xiSetParamInt(xiH1, XI_PRM_GPO_SELECTOR, 2); | |
HandleResult(stat,"XI_PRM_GPO_SELECTOR 1"); | |
stat = xiSetParamInt(xiH1, XI_PRM_GPO_MODE, XI_GPO_EXPOSURE_PULSE); | |
HandleResult(stat,"XI_PRM_GPO_MODE 1"); | |
xiSetParamInt(xiH1, XI_PRM_ACQ_TIMING_MODE, XI_ACQ_TIMING_MODE_FRAME_RATE); | |
xiSetParamInt(xiH1, XI_PRM_FRAMERATE, 4); | |
// Setting "exposure" parameter | |
stat = xiSetParamInt(xiH1, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat,"xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH1); | |
HandleResult(stat,"xiStartAcquisition1"); | |
if (SUPPORT_FOR_2_CAMERAS) | |
{ | |
// set trigger mode on camera2 - as slave | |
printf("Setting parameters for camera 2\n"); | |
stat = xiSetParamInt(xiH2, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat,"XI_PRM_TRG_SOURCE 2"); | |
stat = xiSetParamInt(xiH2, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat,"XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH2, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat,"XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH2, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH2); | |
HandleResult(stat,"xiStartAcquisition2"); | |
} //SUPPORT_FOR_2_CAMERAS | |
if (SUPPORT_FOR_3_CAMERAS) { | |
printf("Setting parameters for camera 3\n"); | |
stat = xiSetParamInt(xiH3, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 3"); | |
stat = xiSetParamInt(xiH3, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH3, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
printf("Getting here"); | |
stat = xiSetParamInt(xiH3, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH3); | |
printf("Over here"); | |
HandleResult(stat, "xiStartAcquisition3"); | |
} | |
if (SUPPORT_FOR_4_CAMERAS) { | |
printf("Setting parameters for camera 4\n"); | |
stat = xiSetParamInt(xiH4, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 4"); | |
stat = xiSetParamInt(xiH4, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH4, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH4, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH4); | |
HandleResult(stat, "xiStartAcquisition4"); | |
} | |
if (SUPPORT_FOR_5_CAMERAS) { | |
printf("Setting parameters for camera 5\n"); | |
stat = xiSetParamInt(xiH5, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 5"); | |
stat = xiSetParamInt(xiH5, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH5, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH5, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH5); | |
HandleResult(stat, "xiStartAcquisition5"); | |
} | |
if (SUPPORT_FOR_6_CAMERAS) { | |
printf("Setting parameters for camera 6\n"); | |
stat = xiSetParamInt(xiH6, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 6"); | |
stat = xiSetParamInt(xiH6, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH6, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH6, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH6); | |
HandleResult(stat, "xiStartAcquisition6"); | |
} | |
if (SUPPORT_FOR_7_CAMERAS) { | |
printf("Setting parameters for camera 7\n"); | |
stat = xiSetParamInt(xiH7, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 7"); | |
stat = xiSetParamInt(xiH7, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH7, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH7, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH7); | |
HandleResult(stat, "xiStartAcquisition7"); | |
} | |
if (SUPPORT_FOR_8_CAMERAS) { | |
printf("Setting parameters for camera 8\n"); | |
stat = xiSetParamInt(xiH8, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 8"); | |
stat = xiSetParamInt(xiH8, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH8, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH8, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH8); | |
HandleResult(stat, "xiStartAcquisition8"); | |
} | |
if (SUPPORT_FOR_9_CAMERAS) { | |
printf("Setting parameters for camera 9\n"); | |
stat = xiSetParamInt(xiH9, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 9"); | |
stat = xiSetParamInt(xiH9, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 9"); | |
stat = xiSetParamInt(xiH9, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 9"); | |
stat = xiSetParamInt(xiH9, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH9); | |
HandleResult(stat, "xiStartAcquisition9"); | |
} | |
if (SUPPORT_FOR_10_CAMERAS) { | |
printf("Setting parameters for camera 10\n"); | |
stat = xiSetParamInt(xiH10, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 10"); | |
stat = xiSetParamInt(xiH10, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH10, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH10, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH10); | |
HandleResult(stat, "xiStartAcquisition10"); | |
} | |
if (SUPPORT_FOR_11_CAMERAS) { | |
printf("Setting parameters for camera 11\n"); | |
stat = xiSetParamInt(xiH11, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_FALLING); | |
HandleResult(stat, "XI_PRM_TRG_SOURCE 11"); | |
stat = xiSetParamInt(xiH11, XI_PRM_GPI_SELECTOR, 1); | |
HandleResult(stat, "XI_PRM_GPI_SELECTOR 2"); | |
stat = xiSetParamInt(xiH11, XI_PRM_GPI_MODE, XI_GPI_TRIGGER); | |
HandleResult(stat, "XI_PRM_GPI_MODE 2"); | |
stat = xiSetParamInt(xiH11, XI_PRM_EXPOSURE, EXPOSURE); | |
HandleResult(stat, "xiSetParam (exposure set)"); | |
stat = xiStartAcquisition(xiH11); | |
HandleResult(stat, "xiStartAcquisition11"); | |
} | |
// trigger acquisition on Master camera | |
int valid_frames = 0; | |
int success; | |
clock_t begin = clock(); | |
while (retry--) | |
{ | |
success = 1; | |
printf("Acquisition on master camera\n"); | |
// get image from both cameras | |
#define TIMEOUT_WAIT_FOR_IMAGE_MS 3000 | |
printf("Getting the images\n"); | |
stat = xiGetImage(xiH1, TIMEOUT_WAIT_FOR_IMAGE_MS, &image1); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage1 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera1 (%dx%d)\n",(int)image1.width,(int)image1.height); | |
if (SUPPORT_FOR_2_CAMERAS) | |
{ | |
stat = xiGetImage(xiH2, TIMEOUT_WAIT_FOR_IMAGE_MS, &image2); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage2 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera2 (%dx%d)\n",(int)image2.width,(int)image2.height); | |
} //SUPPORT_FOR_2_CAMERAS | |
if (SUPPORT_FOR_3_CAMERAS) { | |
stat = xiGetImage(xiH3, TIMEOUT_WAIT_FOR_IMAGE_MS, &image3); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage3 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera3 (%dx%d)\n", (int)image3.width, (int)image3.height); | |
} | |
if (SUPPORT_FOR_4_CAMERAS) { | |
stat = xiGetImage(xiH4, TIMEOUT_WAIT_FOR_IMAGE_MS, &image4); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage4 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera4 (%dx%d)\n", (int)image4.width, (int)image4.height); | |
} | |
if (SUPPORT_FOR_5_CAMERAS) { | |
stat = xiGetImage(xiH5, TIMEOUT_WAIT_FOR_IMAGE_MS, &image5); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage5 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera5 (%dx%d)\n", (int)image5.width, (int)image5.height); | |
} | |
if (SUPPORT_FOR_6_CAMERAS) { | |
stat = xiGetImage(xiH6, TIMEOUT_WAIT_FOR_IMAGE_MS, &image6); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage6 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera6 (%dx%d)\n", (int)image6.width, (int)image6.height); | |
} | |
if (SUPPORT_FOR_7_CAMERAS) { | |
stat = xiGetImage(xiH7, TIMEOUT_WAIT_FOR_IMAGE_MS, &image7); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage7 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera7 (%dx%d)\n", (int)image7.width, (int)image7.height); | |
} | |
if (SUPPORT_FOR_8_CAMERAS) { | |
stat = xiGetImage(xiH8, TIMEOUT_WAIT_FOR_IMAGE_MS, &image8); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage8 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera8 (%dx%d)\n", (int)image8.width, (int)image8.height); | |
} | |
if (SUPPORT_FOR_9_CAMERAS) { | |
stat = xiGetImage(xiH9, TIMEOUT_WAIT_FOR_IMAGE_MS, &image9); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage9 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera9 (%dx%d)\n", (int)image9.width, (int)image9.height); | |
} | |
if (SUPPORT_FOR_10_CAMERAS) { | |
stat = xiGetImage(xiH10, TIMEOUT_WAIT_FOR_IMAGE_MS, &image10); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage10 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera10 (%dx%d)\n", (int)image10.width, (int)image10.height); | |
} | |
if (SUPPORT_FOR_11_CAMERAS) { | |
stat = xiGetImage(xiH11, TIMEOUT_WAIT_FOR_IMAGE_MS, &image11); | |
if (stat != XI_OK) { | |
printf("Error after xiGetImage11 (%d)\n", stat); | |
success = 0; | |
} | |
else | |
printf("Received image from camera11 (%dx%d)\n", (int)image11.width, (int)image11.height); | |
} | |
if (success == 1) | |
valid_frames++; | |
// process images here | |
#ifdef WIN32 | |
//Sleep(2000); | |
#endif | |
} | |
clock_t end = clock(); | |
double time_spent = (double)(end - begin) / CLOCKS_PER_SEC; | |
printf("Total Time: %.2f\n", time_spent); | |
printf("FPS: %.2f\n", valid_frames / time_spent); | |
printf("Valid Frames: %d", valid_frames); | |
finish: | |
printf("Done\n"); | |
if (xiH1) xiCloseDevice(xiH1); | |
if (xiH2) xiCloseDevice(xiH2); | |
if (xiH3) xiCloseDevice(xiH3); | |
if (xiH4) xiCloseDevice(xiH4); | |
if (xiH5) xiCloseDevice(xiH5); | |
if (xiH6) xiCloseDevice(xiH6); | |
if (xiH7) xiCloseDevice(xiH7); | |
if (xiH8) xiCloseDevice(xiH8); | |
if (xiH9) xiCloseDevice(xiH9); | |
if (xiH10) xiCloseDevice(xiH10); | |
if (xiH11) xiCloseDevice(xiH11); | |
#ifdef WIN32 | |
Sleep(2000); | |
#endif | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment