Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
hott_common.h File Reference
#include "std.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/gpio.h"
#include "generated/airframe.h"
#include "generated/radio.h"
+ Include dependency graph for hott_common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SHott
 HOTT structure. More...


#define RC_PPM_TICKS_OF_USEC(_v)   ((_v) * 8 )
 Macro to use radio.h file. More...
#define RC_PPM_SIGNED_TICKS_OF_USEC(_v)   ((_v) * 8 )
#define USEC_OF_RC_PPM_TICKS(_v)   ((_v) / 8)
#define HOTT_NB_CHANNEL   32
 Generated code holding the description of a given transmitter. More...


void hott_common_init (struct SHott *hott, struct uart_periph *dev)
 Init function. More...
void hott_common_decode_event (struct SHott *hott, struct uart_periph *dev)
 Decoding event function. More...

Data Structure Documentation

◆ SHott

struct SHott

HOTT structure.

Definition at line 70 of file hott_common.h.

Data Fields
uint8_t buffer[HOTT_BUF_LENGTH] input buffer
uint8_t expected_channels expected number of channels send in header
bool frame_available new frame available
uint8_t idx input index
uint16_t ppm[HOTT_NB_CHANNEL] decoded and converted values
uint16_t pulses[HOTT_NB_CHANNEL] decoded values
uint8_t status decoder state machine status

Macro Definition Documentation



Definition at line 61 of file hott_common.h.


#define HOTT_NB_CHANNEL   32

Generated code holding the description of a given transmitter.

Define number of channels.

HOTT SUMD frame has between 2 and 32 channels The radio XML file is used to assign the input values to RC channels.

Definition at line 60 of file hott_common.h.


#define RC_PPM_SIGNED_TICKS_OF_USEC (   _v)    ((_v) * 8 )

Definition at line 44 of file hott_common.h.


#define RC_PPM_TICKS_OF_USEC (   _v)    ((_v) * 8 )

Macro to use radio.h file.

HOTT: 7040..12000..16800 PPM: 880..1500..2100

Definition at line 43 of file hott_common.h.


#define USEC_OF_RC_PPM_TICKS (   _v)    ((_v) / 8)

Definition at line 45 of file hott_common.h.

Function Documentation

◆ hott_common_decode_event()

void hott_common_decode_event ( struct SHott hott,
struct uart_periph dev 

Decoding event function.

Definition at line 97 of file hott_common.c.

References SHott::buffer, decode_hott_buffer(), dev, SHott::expected_channels, SHott::frame_available, HOTT_NB_CHANNEL, HOTT_START_BYTE, HOTT_STATUS_DATA, HOTT_STATUS_GOT_HEADER1, HOTT_STATUS_GOT_START, HOTT_STATUS_UNINIT, SHott::idx, SHott::ppm, SHott::pulses, SHott::status, uart_char_available(), and uart_getch().

Referenced by hott_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hott_common_init()

void hott_common_init ( struct SHott hott,
struct uart_periph dev 

Init function.

Definition at line 42 of file hott_common.c.

References B115200, dev, SHott::frame_available, HOTT_STATUS_UNINIT, SHott::status, uart_periph_set_baudrate(), uart_periph_set_bits_stop_parity(), UBITS_8, UPARITY_NO, and USTOP_1.

Referenced by hott_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: