Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vn200_serial.c File Reference

Vectornav VN-200 INS subsystem. More...

+ Include dependency graph for vn200_serial.c:

Go to the source code of this file.

Functions

static unsigned short calculateCRC (unsigned char data[], unsigned int length)
 Calculates the 16-bit CRC for the given ASCII or binary message. More...
 
static bool verify_chk (unsigned char data[], unsigned int length, uint16_t *calc_chk, uint16_t *rec_chk)
 Verify checksum. More...
 
static void vn200_read_buffer (struct VNPacket *vnp)
 
void vn200_event (struct VNPacket *vnp)
 
void vn200_parse (struct VNPacket *vnp, uint8_t c)
 Packet Collection & state machine. More...
 

Detailed Description

Vectornav VN-200 INS subsystem.

Author
Michal Podhradsky micha.nosp@m.l.po.nosp@m.dhrad.nosp@m.sky@.nosp@m.aggie.nosp@m.mail.nosp@m..usu..nosp@m.edu

Definition in file vn200_serial.c.

Function Documentation

static unsigned short calculateCRC ( unsigned char  data[],
unsigned int  length 
)
inlinestatic

Calculates the 16-bit CRC for the given ASCII or binary message.

The CRC is calculated over the packet starting just after the sync byte (not including the sync byte) and ending at the end of payload.

Definition at line 37 of file vn200_serial.c.

References crc.

Referenced by verify_chk().

+ Here is the caller graph for this function:

static bool verify_chk ( unsigned char  data[],
unsigned int  length,
uint16_t calc_chk,
uint16_t rec_chk 
)
inlinestatic

Verify checksum.

Definition at line 55 of file vn200_serial.c.

References calculateCRC().

Referenced by vn200_parse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vn200_event ( struct VNPacket vnp)

Definition at line 77 of file vn200_serial.c.

References uart_char_available(), and vn200_read_buffer().

Referenced by ins_vectornav_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vn200_parse ( struct VNPacket vnp,
uint8_t  c 
)
static void vn200_read_buffer ( struct VNPacket vnp)
inlinestatic

Definition at line 69 of file vn200_serial.c.

References VNPacket::msg_available, uart_char_available(), uart_getch(), and vn200_parse().

Referenced by vn200_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: