GWSOFT.co.uk  

Site by Graham Wharton 
November 19th 2008 06:50:08 AM 



NOTE : This project is not currently in development and is totally unsupported. These pages are here for information only.

takePicture

Declaration

extern "C" status_t takePicture();

Description

This function is entirely optional. The function returns a status_t error code to indicate the success of the operation. Any of the status_t error codes can be used, but it is suggested that you stick to using B_NO_ERROR for success and B_ERROR for failure.

The function should instruct the camera to capture an image to it's memory/card.

Example Implementation - Kodak DC210 Plugin

status_t takePicture() { haveigotfilenames = false; unsigned char* buffer = new unsigned char[1]; //Send the command to take a picture ComPort->Write("\x7C\x00\x00\x00\x00\x00\x00\x1A",8); ComPort->Read(buffer,1); while (buffer[0] == 0xf0) ComPort->Read(buffer,1); if (buffer[0] == 0xe2) return(B_ERROR); else if (buffer[0] == 0xd1) { ComPort->Read(buffer,1); while (buffer[0] == 0xf0) ComPort->Read(buffer,1); if (buffer[0] == 0x00) { snooze(50000); return(B_NO_ERROR); } else return(B_ERROR); } else return(B_ERROR); }
BDCP Developers Home Page