Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/sensors/cameras/jevois.h"
#include "std.h"
#include "mcu_periph/uart.h"
#include "subsystems/abi.h"
#include "math/pprz_algebra_float.h"
#include "subsystems/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, JV_SEND_MSG } |
Functions | |
void | jevois_report (void) |
void | jevois_init (void) |
static int | jevois_extract_nb (char *in) |
static void | jevois_send_message (void) |
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') |
Definition at line 44 of file jevois.c.
Referenced by jevois_parse().
#define JEVOIS_MAX_LEN 32 |
Definition at line 40 of file jevois.c.
Referenced by jevois_extract_nb(), jevois_init(), and jevois_parse().
enum jevois_state |
void jevois_event | ( | void | ) |
Definition at line 393 of file jevois.c.
References jevois, JEVOIS_DEV, jevois_parse(), uart_char_available(), and uart_getch().
|
static |
Definition at line 131 of file jevois.c.
References JEVOIS_MAX_LEN.
Referenced by jevois_send_message().
void jevois_init | ( | void | ) |
Definition at line 114 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 172 of file jevois.c.
References jevois_t::buf, 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_CHECK_DELIM, 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, jevois_send_message(), JV_COORD, JV_DIM, JV_EXTRA, JV_ID, JV_QUAT, JV_SEND_MSG, 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 83 of file jevois.c.
References jevois_msg_t::coord, jevois_t::data_available, DefaultChannel, DefaultDevice, jevois_msg_t::dim, jevois_msg_t::id, jevois, Max, 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 148 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_parse().
void jevois_send_state | ( | void | ) |
Send state to camera.
Definition at line 436 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 403 of file jevois.c.
References JEVOIS_DEV, 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 422 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 412 of file jevois.c.
References jevois_send_string(), and jevois_stream_setting.
Referenced by jevois_setmapping().
struct jevois_t jevois |
Definition at line 80 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().