Paparazzi UAS  v5.15_devel-113-g1b57ff1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
catia.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <errno.h>
#include "serial.h"
#include "chdk_pipe.h"
#include "protocol.h"
+ Include dependency graph for catia.c:

Go to the source code of this file.

Macros

#define MAX_FILENAME   512
 
#define MAX_PROCESSING_THREADS   8
 
#define MAX_IMAGE_BUFFERS   25
 
#define IMAGE_SIZE   70
 
#define SODA   "/root/develop/allthings_obc2014/src/soda/soda"
 

Functions

static void * handle_msg_shoot (void *ptr)
 
static void send_msg_image_buffer (void)
 
static void send_msg_status (void)
 
int main (int argc, char *argv[])
 

Variables

static volatile int is_shooting
 
static volatile int image_idx
 
static volatile int image_count
 
static volatile int shooting_idx
 
static volatile int shooting_count
 
static volatile int shooting_thread_count
 
static char image_buffer [MAX_IMAGE_BUFFERS][IMAGE_SIZE]
 
static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER
 

Macro Definition Documentation

#define IMAGE_SIZE   70

Definition at line 13 of file catia.c.

Referenced by main(), and send_msg_image_buffer().

#define MAX_FILENAME   512

Definition at line 10 of file catia.c.

Referenced by handle_msg_shoot().

#define MAX_IMAGE_BUFFERS   25

Definition at line 12 of file catia.c.

Referenced by main(), and send_msg_image_buffer().

#define MAX_PROCESSING_THREADS   8

Definition at line 11 of file catia.c.

Referenced by main().

#define SODA   "/root/develop/allthings_obc2014/src/soda/soda"

Definition at line 15 of file catia.c.

Referenced by handle_msg_shoot().

Function Documentation

static void * handle_msg_shoot ( void *  ptr)
static

Definition at line 104 of file catia.c.

References chdk_pipe_shoot(), dc_shot_union::data, is_shooting, MAX_FILENAME, mut, shooting_count, shooting_thread_count, and SODA.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_msg_image_buffer ( void  )
inlinestatic

Definition at line 147 of file catia.c.

References dc_shot_union::i, image_buffer, image_count, image_idx, IMAGE_SIZE, MAX_IMAGE_BUFFERS, MORA_PAYLOAD, MORA_PAYLOAD_MSG_SIZE, MoraHeader, MoraPutUint8, and MoraTrailer.

Referenced by main().

+ Here is the caller graph for this function:

static void send_msg_status ( void  )
inlinestatic

Definition at line 166 of file catia.c.

References dc_shot_union::i, MORA_STATUS, MORA_STATUS_MSG_SIZE, MoraHeader, MoraPutUint8, MoraTrailer, mut, shooting_count, and shooting_thread_count.

Referenced by main().

+ Here is the caller graph for this function:

Variable Documentation

char image_buffer[MAX_IMAGE_BUFFERS][IMAGE_SIZE]
static

Definition at line 22 of file catia.c.

Referenced by main(), and send_msg_image_buffer().

volatile int image_count
static

Definition at line 21 of file catia.c.

Referenced by main(), and send_msg_image_buffer().

volatile int image_idx
static

Definition at line 21 of file catia.c.

Referenced by main(), and send_msg_image_buffer().

volatile int is_shooting
static

Definition at line 21 of file catia.c.

Referenced by handle_msg_shoot(), and main().

pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 23 of file catia.c.

Referenced by handle_msg_shoot(), main(), and send_msg_status().

volatile int shooting_count
static

Definition at line 21 of file catia.c.

Referenced by handle_msg_shoot(), main(), and send_msg_status().

volatile int shooting_idx
static

Definition at line 21 of file catia.c.

Referenced by main().

volatile int shooting_thread_count
static

Definition at line 21 of file catia.c.

Referenced by handle_msg_shoot(), main(), and send_msg_status().