Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
at_com.c File Reference

Sending and receiving of AT-commands specified by the ardrone API. More...

#include "at_com.h"
#include "boards/ardrone2_sdk.h"
#include "generated/airframe.h"
#include <stdlib.h>
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
+ Include dependency graph for at_com.c:

Go to the source code of this file.

Functions

void at_com_send (char *command)
 
void init_at_config (void)
 
void init_at_com (void)
 
void at_com_recieve_navdata (unsigned char *buffer)
 
void at_com_send_config (char *key, char *value)
 
void at_com_send_ftrim (void)
 
void at_com_send_ref (int bits)
 
void at_com_send_pcmd (int mode, float thrust, float roll, float pitch, float yaw)
 
void at_com_send_calib (int device)
 

Variables

int packet_seq = 1
 
int at_socket = -1
 
int navdata_socket = -1
 
struct sockaddr_in pc_addr
drone_at drone_nav 
from
 
bool_t at_com_ready = FALSE
 
char sessionId [9]
 

Detailed Description

Sending and receiving of AT-commands specified by the ardrone API.

Definition in file at_com.c.

Function Documentation

void at_com_recieve_navdata ( unsigned char *  buffer)

Definition at line 136 of file at_com.c.

References ARDRONE_NAVDATA_BUFFER_SIZE, from, and navdata_socket.

Referenced by ahrs_propagate().

+ Here is the caller graph for this function:

void at_com_send ( char *  command)

Definition at line 143 of file at_com.c.

References at_socket.

Referenced by at_com_send_calib(), at_com_send_config(), at_com_send_ftrim(), at_com_send_pcmd(), and at_com_send_ref().

+ Here is the caller graph for this function:

void at_com_send_calib ( int  device)

Definition at line 190 of file at_com.c.

References at_com_send(), and packet_seq.

Referenced by actuators_set().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void at_com_send_config ( char *  key,
char *  value 
)

Definition at line 149 of file at_com.c.

References at_com_send(), packet_seq, and sessionId.

Referenced by actuators_set(), ahrs_init(), and init_at_config().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void at_com_send_ftrim ( void  )

Definition at line 159 of file at_com.c.

References at_com_send(), and packet_seq.

Referenced by ahrs_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void at_com_send_pcmd ( int  mode,
float  thrust,
float  roll,
float  pitch,
float  yaw 
)

Definition at line 173 of file at_com.c.

References at_com_send(), and packet_seq.

Referenced by actuators_set().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void at_com_send_ref ( int  bits)

Definition at line 166 of file at_com.c.

References at_com_send(), packet_seq, and REF_DEFAULT.

Referenced by actuators_set().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void init_at_com ( void  )

Definition at line 55 of file at_com.c.

References ARDRONE_AT_PORT, ARDRONE_IP, ARDRONE_NAVDATA_PORT, at_com_ready, at_socket, init_at_config(), navdata_socket, and TRUE.

Referenced by actuators_init(), and ahrs_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void init_at_config ( void  )

Definition at line 101 of file at_com.c.

References at_com_send_config(), and sessionId.

Referenced by init_at_com().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool_t at_com_ready = FALSE

Definition at line 48 of file at_com.c.

Referenced by init_at_com().

int at_socket = -1

Definition at line 40 of file at_com.c.

Referenced by at_com_send(), and init_at_com().

struct sockaddr_in pc_addr drone_at drone_nav from

Definition at line 43 of file at_com.c.

Referenced by at_com_recieve_navdata().

int navdata_socket = -1

Definition at line 41 of file at_com.c.

Referenced by at_com_recieve_navdata(), and init_at_com().

int packet_seq = 1
char sessionId[9]

Definition at line 49 of file at_com.c.

Referenced by at_com_send_config(), and init_at_config().