for (int k = 0; k<8; k++)
{
//double buffer
ready=WaitForMultipleObjects(2,hEvents,false,2000);
if (ready==WAIT_OBJECT_0)
{
PCO_AddBufferEx(hCam,0,0,sBufNr1, xRes, yRes, 0x000e);
for (int l = 0; l<xRes * yRes; l++)bitMap[l+mapOffset] = data1[l];
Update();
}
else
{
if(ready==(WAIT_OBJECT_0+1))
{
PCO_AddBufferEx(hCam,0,0,sBufNr2, xRes, yRes, 0x000e);
SetPort(false);
for (int l = 0; l<xRes * yRes; l++)bitMap[l+mapOffset] = data2[l];
Update();
}
else{
PCO_SetRecordingState(hCam,0);
abort = true;
}
}
}
for (int k = 0; k<8; k++)
{
//double buffer
ready=WaitForMultipleObjects(2,hEvents,false,2000);
if (ready==WAIT_OBJECT_0)
{
PCO_AddBufferEx(hCam,0,0,sBufNr1, xRes, yRes, 0x000e);
for (int l = 0; l<xRes * yRes; l++)bitMap[l+mapOffset] = data1[l];
Update();
}
else
{
if(ready==(WAIT_OBJECT_0+1))
{
PCO_AddBufferEx(hCam,0,0,sBufNr2, xRes, yRes, 0x000e);
SetPort(false);
for (int l = 0; l<xRes * yRes; l++)bitMap[l+mapOffset] = data2[l];
Update();
}
else{
PCO_SetRecordingState(hCam,0);
abort = true;
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks