Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
jevois.c File Reference
#include "modules/sensors/cameras/jevois.h"
#include "std.h"
#include "mcu_periph/uart.h"
#include "modules/core/abi.h"
#include "math/pprz_algebra_float.h"
#include "modules/datalink/downlink.h"
#include <string.h>
#include <stdio.h>
+ Include dependency graph for jevois.c:

Go to the source code of this file.

Data Structures

struct  jevois_msg_t
 
struct  jevois_t
 

Macros

#define JEVOIS_MAX_LEN   32
 
#define JEVOIS_MAX_COORD   18
 
#define JEVOIS_CHECK_DELIM(_c)   (_c == ' ' || _c == '\n' || _c == '\r' || _c == '\0')
 

Enumerations

enum  jevois_state {
  JV_SYNC = 0 , JV_TYPE , JV_ID , JV_SIZE ,
  JV_COORD , JV_DIM , JV_QUAT , JV_EXTRA
}
 

Functions

void jevois_report (void)
 
void jevois_init (void)
 
int jevois_extract_nb (char *in)
 Extract a number from jevoid ID field. More...
 
static void jevois_send_message (void)
 
static void jevois_handle_msg (struct jevois_t *jv)
 
static void jevois_parse (struct jevois_t *jv, char c)
 
void jevois_event (void)
 
void jevois_send_string (char *s)
 Generic function to send a string command to Jevois. More...
 
void jevois_stream (bool activate)
 Start and stop streaming. More...
 
void jevois_setmapping (int number)
 Set video mapping. More...
 
void jevois_send_state (void)
 Send state to camera. More...
 

Variables

int jevois_mapping_setting
 
bool jevois_stream_setting
 
struct jevois_t jevois
 

Detailed Description

Author
Gautier Hattenberger Decoder for standardized messages from the JEVOIS smart camera (http://jevois.org)

Definition in file jevois.c.


Data Structure Documentation

◆ jevois_msg_t

struct jevois_msg_t

Definition at line 47 of file jevois.c.

+ Collaboration diagram for jevois_msg_t:
Data Fields
int16_t coord[JEVOIS_MAX_COORD]
uint16_t dim[3]
char extra[JEVOIS_MAX_LEN]
char id[JEVOIS_MAX_LEN]
uint8_t nb
struct FloatQuat quat
uint8_t type

◆ jevois_t

struct jevois_t

Definition at line 70 of file jevois.c.

+ Collaboration diagram for jevois_t:
Data Fields
char buf[JEVOIS_MAX_LEN]
bool data_available
uint8_t idx
struct jevois_msg_t msg
uint8_t n
enum jevois_state state

Macro Definition Documentation

◆ JEVOIS_CHECK_DELIM

#define JEVOIS_CHECK_DELIM (   _c)    (_c == ' ' || _c == '\n' || _c == '\r' || _c == '\0')

Definition at line 44 of file jevois.c.

◆ JEVOIS_MAX_COORD

#define JEVOIS_MAX_COORD   18

Definition at line 42 of file jevois.c.

◆ JEVOIS_MAX_LEN

#define JEVOIS_MAX_LEN   32

Definition at line 40 of file jevois.c.

Enumeration Type Documentation

◆ jevois_state

Enumerator
JV_SYNC 
JV_TYPE 
JV_ID 
JV_SIZE 
JV_COORD 
JV_DIM 
JV_QUAT 
JV_EXTRA 

Definition at line 58 of file jevois.c.

Function Documentation

◆ jevois_event()

void jevois_event ( void  )

Definition at line 402 of file jevois.c.

References jevois, JEVOIS_DEV, jevois_parse(), uart_char_available(), and uart_getch().

+ Here is the call graph for this function:

◆ jevois_extract_nb()

int jevois_extract_nb ( char *  in)

Extract a number from jevoid ID field.

Definition at line 130 of file jevois.c.

References JEVOIS_MAX_LEN.

Referenced by jevois_send_message(), and tag_track_cb().

+ Here is the caller graph for this function:

◆ jevois_handle_msg()

static void jevois_handle_msg ( struct jevois_t jv)
static

Definition at line 170 of file jevois.c.

References CAM_JEVOIS_ID, jevois_msg_t::coord, jevois_t::data_available, jevois_msg_t::dim, jevois_msg_t::extra, jevois_msg_t::id, jevois_t::idx, jevois_send_message(), jevois_t::msg, jevois_t::n, jevois_msg_t::nb, jevois_msg_t::quat, and jevois_msg_t::type.

Referenced by jevois_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jevois_init()

◆ jevois_parse()

◆ jevois_report()

◆ jevois_send_message()

static void jevois_send_message ( void  )
static

Definition at line 147 of file jevois.c.

References CAM_JEVOIS_ID, jevois_msg_t::coord, jevois_msg_t::dim, jevois_msg_t::id, jevois, jevois_extract_nb(), JEVOIS_HFOV, JEVOIS_NORM, jevois_report(), JEVOIS_VFOV, and jevois_t::msg.

Referenced by jevois_handle_msg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jevois_send_state()

void jevois_send_state ( void  )

Send state to camera.

Definition at line 445 of file jevois.c.

References alt_mm, jevois_send_string(), FloatQuat::qi, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, stateGetNedToBodyQuat_f(), stateGetPositionEnu_f(), EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

+ Here is the call graph for this function:

◆ jevois_send_string()

void jevois_send_string ( char *  s)

Generic function to send a string command to Jevois.

Parameters
[in]sstring command to send

Definition at line 412 of file jevois.c.

References JEVOIS_DEV, s, and uart_put_byte().

Referenced by jevois_send_state(), jevois_setmapping(), and jevois_stream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jevois_setmapping()

void jevois_setmapping ( int  number)

Set video mapping.

Parameters
[in]numbervideo mapping number

Definition at line 431 of file jevois.c.

References jevois_mapping_setting, jevois_send_string(), jevois_stream(), and s.

+ Here is the call graph for this function:

◆ jevois_stream()

void jevois_stream ( bool  activate)

Start and stop streaming.

Parameters
[in]activateenable or disable streaming

Definition at line 421 of file jevois.c.

References jevois_send_string(), and jevois_stream_setting.

Referenced by jevois_setmapping().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ jevois

struct jevois_t jevois

Definition at line 37 of file jevois.c.

Referenced by jevois_event(), jevois_init(), jevois_report(), and jevois_send_message().

◆ jevois_mapping_setting

int jevois_mapping_setting

Definition at line 36 of file jevois.c.

Referenced by jevois_init(), and jevois_setmapping().

◆ jevois_stream_setting

bool jevois_stream_setting

Definition at line 37 of file jevois.c.

Referenced by jevois_init(), and jevois_stream().