Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include "chdk_pipe.h"
Go to the source code of this file.
Macros | |
#define | READ 0 |
#define | WRITE 1 |
#define | MAX_FILENAME 255 |
#define | SHELL "/root/develop/allthings_obc2014/src/popcorn/popcorn.sh" |
Functions | |
static void | wait_for_cmd (int timeout) |
Wait for the commandline to be available TODO: add timeout. More... | |
static void | wait_for_img (char *filename, int timeout) |
Wait for the image to be available TODO: add timeout. More... | |
static pid_t | popen2 (const char *command, int *infp, int *outfp) |
Open a process with stdin and stdout. More... | |
void | chdk_pipe_init (void) |
Initialize the CHDK pipe. More... | |
void | chdk_pipe_deinit (void) |
Deinitialize CHDK pipe. More... | |
void | chdk_pipe_shoot (char *filename) |
Shoot an image. More... | |
Variables | |
const char * | setup |
static int | fo |
static int | fi |
#define MAX_FILENAME 255 |
Definition at line 17 of file chdk_pipe.c.
#define READ 0 |
Definition at line 15 of file chdk_pipe.c.
#define SHELL "/root/develop/allthings_obc2014/src/popcorn/popcorn.sh" |
Definition at line 18 of file chdk_pipe.c.
#define WRITE 1 |
Definition at line 16 of file chdk_pipe.c.
void chdk_pipe_deinit | ( | void | ) |
Deinitialize CHDK pipe.
Definition at line 79 of file chdk_pipe.c.
References fi.
Referenced by main().
void chdk_pipe_init | ( | void | ) |
Initialize the CHDK pipe.
Definition at line 50 of file chdk_pipe.c.
References fi, fo, popen2(), setup, SHELL, and wait_for_cmd().
Referenced by main().
void chdk_pipe_shoot | ( | char * | filename | ) |
Shoot an image.
Definition at line 92 of file chdk_pipe.c.
References fi, and wait_for_img().
Referenced by handle_msg_shoot().
|
static |
Open a process with stdin and stdout.
Definition at line 137 of file chdk_pipe.c.
Referenced by chdk_pipe_init().
|
static |
Wait for the commandline to be available TODO: add timeout.
Definition at line 126 of file chdk_pipe.c.
References fo.
Referenced by chdk_pipe_init(), and wait_for_img().
|
static |
Wait for the image to be available TODO: add timeout.
Definition at line 102 of file chdk_pipe.c.
References fo, timeout, and wait_for_cmd().
Referenced by chdk_pipe_shoot().
|
static |
Definition at line 24 of file chdk_pipe.c.
Referenced by chdk_pipe_deinit(), chdk_pipe_init(), and chdk_pipe_shoot().
|
static |
Definition at line 24 of file chdk_pipe.c.
Referenced by chdk_pipe_init(), wait_for_cmd(), and wait_for_img().
const char* setup |
Definition at line 21 of file chdk_pipe.c.
Referenced by chdk_pipe_init().