diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-11-03 10:26:14 -0700 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2017-11-03 10:26:14 -0700 |
commit | 1e639a6394e1e4452ae149c0da7ed3232047950f (patch) | |
tree | 76d2fed725d6ed2f22eb703adf3acc1bbb962352 | |
parent | d9cc2c8146a3ef62e33da0ba5bff6e78acc446dd (diff) |
Strip out test code
These function should be called from a seperate component which I may or
may not include in this repository
-rw-r--r-- | camera.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -3,18 +3,6 @@ #include "camera.h" #include <time.h> -COMPONENT_INIT { - Camera cam = { - .fd = openCameraFd(), - .serialNum = 0x0, - .bufferLen = 0, - .frameptr = 0 - }; - bool success = takePicture(&cam); - LE_INFO("Number of bytes in buffer: %d", NUM_ARRAY_MEMBERS(cam.buff)); - LE_INFO("Did it work: %d", success); -} - // Used to wait for the serial port void delay (unsigned int msecs) { unsigned int secs = msecs / 1000; @@ -262,17 +250,3 @@ bool setPTZ(Camera *cam, uint16_t wz, uint16_t hz, uint16_t pan, uint16_t tilt) }; return !runCommand(cam, VC0706_SET_ZOOM, args, 5); } - -size_t camToFile (Camera *cam, char *path) { - FILE *photo = fopen(path, "w"); - if (photo != NULL) { - LE_INFO("File pointer for %s is valid", path); - size_t bytesWritten = fwrite(&(cam->buff), sizeof(cam->buff[0]), cam->bufferLen, photo); - fclose(photo); - return bytesWritten; - } - else { - LE_INFO("File pointer for %s is invalid", path); - return -1; - } -} |