40#define JEVOIS_MAX_LEN 32
42#define JEVOIS_MAX_COORD 18
44#define JEVOIS_CHECK_DELIM(_c) (_c == ' ' || _c == '\n' || _c == '\r' || _c == '\0')
131 unsigned int i,
j = 0;
134 for (i = 0; i <
strlen(
in)+1; i++) {
135 if ((
in[i] >=
'0' &&
in[i] <
'9') ||
in[i] ==
'-') {
138 }
else if (first ||
in[i] ==
'\0') {
153#if JEVOIS_SEND_FOLLOW_TARGET
159#if JEVOIS_SEND_VISUAL_DETECTION
182 jv->data_available =
true;
200 jv->buf[
jv->idx++] = c;
203 if (
jv->buf[0] ==
'T' &&
jv->buf[1] ==
'1') {
207 }
else if (
jv->buf[0] ==
'N' &&
jv->buf[1] ==
'1') {
211 }
else if (
jv->buf[0] ==
'D' &&
jv->buf[1] ==
'1') {
215 }
else if (
jv->buf[0] ==
'T' &&
jv->buf[1] ==
'2') {
219 }
else if (
jv->buf[0] ==
'N' &&
jv->buf[1] ==
'2') {
223 }
else if (
jv->buf[0] ==
'D' &&
jv->buf[1] ==
'2') {
227 }
else if (
jv->buf[0] ==
'F' &&
jv->buf[1] ==
'2') {
231 }
else if (
jv->buf[0] ==
'T' &&
jv->buf[1] ==
'3') {
235 }
else if (
jv->buf[0] ==
'N' &&
jv->buf[1] ==
'3') {
239 }
else if (
jv->buf[0] ==
'D' &&
jv->buf[1] ==
'3') {
243 }
else if (
jv->buf[0] ==
'F' &&
jv->buf[1] ==
'3') {
255 jv->msg.id[
jv->idx] =
'\0';
266 jv->msg.id[
jv->idx++] = c;
274 jv->buf[
jv->idx] =
'\0';
280 jv->buf[
jv->idx++] = c;
285 jv->buf[
jv->idx] =
'\0';
287 if (
jv->n ==
jv->msg.nb) {
291 switch (
jv->msg.type) {
318 jv->buf[
jv->idx++] = c;
323 jv->buf[
jv->idx] =
'\0';
325 if (
jv->n ==
jv->msg.nb) {
340 jv->buf[
jv->idx++] = c;
345 jv->buf[
jv->idx] =
'\0';
369 jv->buf[
jv->idx++] = c;
374 jv->msg.extra[
jv->idx] =
'\0';
379 }
else if( c==
'\r') {
387 jv->msg.extra[
jv->idx++] = c;
470 int qi = (
int)(quat.
qi * 1000.f);
471 int qx = (
int)(quat.
qx * 1000.f);
472 int qy = (
int)(quat.
qy * 1000.f);
473 int qz = (
int)(quat.
qz * 1000.f);
Main include for ABI (AirBorneInterface).
Common code for AP and FBW telemetry.
static struct FloatQuat * stateGetNedToBodyQuat_f(void)
Get vehicle body attitude quaternion (float).
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
bool jevois_stream_setting
static void jevois_parse(struct jevois_t *jv, char c)
void jevois_setmapping(int number)
Set video mapping.
static void jevois_handle_msg(struct jevois_t *jv)
char extra[JEVOIS_MAX_LEN]
void jevois_stream(bool activate)
Start and stop streaming.
static void jevois_send_message(void)
int jevois_mapping_setting
int16_t coord[JEVOIS_MAX_COORD]
int jevois_extract_nb(char *in)
Extract a number from jevoid ID field.
#define JEVOIS_CHECK_DELIM(_c)
void jevois_send_string(char *s)
Generic function to send a string command to Jevois.
void jevois_send_state(void)
Send state to camera.
#define JEVOIS_HFOV
Camera horizontal FOV From datasheet it should be 65deg, but it seems that better results are acheive...
#define JEVOIS_VFOV
Camera vertical FOV Camera has a 4/3 ratio.
#define JEVOIS_NORM
Normalized data from JEVOIS are between -1000 and 1000.
#define JEVOIS_MSG_T1
JEVOIS messages types.
void uart_put_byte(struct uart_periph *periph, long fd, uint8_t data)
int uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
uint8_t uart_getch(struct uart_periph *p)
Paparazzi floating point algebra.
vector in East North Up coordinates Units: meters
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.