Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#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>
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 |
Definition in file jevois.c.
struct 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 |
struct 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 |
#define JEVOIS_CHECK_DELIM | ( | _c | ) | (_c == ' ' || _c == '\n' || _c == '\r' || _c == '\0') |
enum jevois_state |
void jevois_event | ( | void | ) |
Definition at line 402 of file jevois.c.
References jevois, JEVOIS_DEV, jevois_parse(), uart_char_available(), and uart_getch().
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().
|
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().
void jevois_init | ( | void | ) |
Definition at line 113 of file jevois.c.
References jevois_t::buf, jevois_t::data_available, jevois_t::idx, jevois, jevois_mapping_setting, JEVOIS_MAX_LEN, jevois_stream_setting, JV_SYNC, jevois_t::n, and jevois_t::state.
|
static |
Definition at line 188 of file jevois.c.
References jevois_t::buf, jevois_msg_t::coord, jevois_msg_t::dim, jevois_msg_t::extra, jevois_msg_t::id, jevois_t::idx, JEVOIS_CHECK_DELIM, jevois_handle_msg(), JEVOIS_MAX_LEN, JEVOIS_MSG_D1, JEVOIS_MSG_D2, JEVOIS_MSG_D3, JEVOIS_MSG_F2, JEVOIS_MSG_F3, JEVOIS_MSG_N1, JEVOIS_MSG_N2, JEVOIS_MSG_N3, JEVOIS_MSG_T1, JEVOIS_MSG_T2, JEVOIS_MSG_T3, JV_COORD, JV_DIM, JV_EXTRA, JV_ID, JV_QUAT, JV_SIZE, JV_SYNC, JV_TYPE, jevois_t::msg, jevois_t::n, jevois_msg_t::nb, FloatQuat::qi, jevois_msg_t::quat, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, jevois_t::state, and jevois_msg_t::type.
Referenced by jevois_event().
void jevois_report | ( | void | ) |
Definition at line 82 of file jevois.c.
References jevois_msg_t::coord, jevois_t::data_available, DefaultChannel, DefaultDevice, jevois_msg_t::dim, jevois_msg_t::id, jevois, jevois_t::msg, jevois_msg_t::nb, FloatQuat::qi, jevois_msg_t::quat, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, and jevois_msg_t::type.
Referenced by jevois_send_message().
|
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().
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.
void jevois_send_string | ( | char * | s | ) |
Generic function to send a string command to Jevois.
[in] | s | string 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().
void jevois_setmapping | ( | int | number | ) |
Set video mapping.
[in] | number | video mapping number |
Definition at line 431 of file jevois.c.
References jevois_mapping_setting, jevois_send_string(), jevois_stream(), and s.
void jevois_stream | ( | bool | activate | ) |
Start and stop streaming.
[in] | activate | enable or disable streaming |
Definition at line 421 of file jevois.c.
References jevois_send_string(), and jevois_stream_setting.
Referenced by jevois_setmapping().
struct jevois_t jevois |
Definition at line 37 of file jevois.c.
Referenced by jevois_event(), jevois_init(), jevois_report(), and jevois_send_message().
int jevois_mapping_setting |
Definition at line 36 of file jevois.c.
Referenced by jevois_init(), and jevois_setmapping().
bool jevois_stream_setting |
Definition at line 37 of file jevois.c.
Referenced by jevois_init(), and jevois_stream().