Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
actuators_sts3032.h File Reference
#include <stdint.h>
#include "mcu_periph/uart.h"
#include "utils/framed_ring_buffer.h"
#include "generated/airframe.h"
Include dependency graph for actuators_sts3032.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sts3032

Macros

#define ActuatorSTS3032Set   actuators_sts3032_set
#define ActuatorsSTS3032Init()
#define ActuatorsSTS3032Commit()

Enumerations

enum  sts3032_rx_state { STS3032_RX_IDLE , STS3032_RX_HEAD_OK , STS3032_RX_GOT_LENGTH }

Functions

void actuators_sts3032_init (void)
void actuators_sts3032_periodic (void)
void actuators_sts3032_event (void)
void actuators_sts3032_set (uint8_t idx, int16_t value)
uint8_t id_idx (struct sts3032 *sts, uint8_t id)
void sts3032_write_pos (struct sts3032 *sts, uint8_t id, int16_t position)
void actuators_sts3032_set_id (float future_id)
void actuators_sts3032_lock_eprom (float lock)
void actuators_sts3032_move (float pos)
void actuators_sts3032_set_response_level (float level)

Variables

struct sts3032 sts
int sts3032_enabled
int sts3032_current_id
int sts3032_future_id
int sts3032_lock_eprom
int sts3032_move
int sts3032_response_level

Data Structure Documentation

◆ sts3032

struct sts3032

Definition at line 41 of file actuators_sts3032.h.

Collaboration diagram for sts3032:
Data Fields
uint8_t buf_header[2]
bool echo
uint8_t ids[SERVOS_STS3032_NB]
struct framed_ring_buffer msg_buf
uint8_t nb_bytes_expected
uint16_t nb_failed_checksum
struct uart_periph * periph
uint16_t pos[SERVOS_STS3032_NB]
uint8_t read_addr
uint8_t rx_checksum
uint8_t rx_id
enum sts3032_rx_state rx_state
uint8_t states[SERVOS_STS3032_NB]
uint32_t time_last_msg
bool wait_reply

Macro Definition Documentation

◆ ActuatorsSTS3032Commit

#define ActuatorsSTS3032Commit ( )
Value:
{}

Definition at line 78 of file actuators_sts3032.h.

◆ ActuatorsSTS3032Init

#define ActuatorsSTS3032Init ( )
Value:
void actuators_sts3032_init(void)

Definition at line 77 of file actuators_sts3032.h.

◆ ActuatorSTS3032Set

#define ActuatorSTS3032Set   actuators_sts3032_set

Definition at line 76 of file actuators_sts3032.h.

Enumeration Type Documentation

◆ sts3032_rx_state

Enumerator
STS3032_RX_IDLE 
STS3032_RX_HEAD_OK 
STS3032_RX_GOT_LENGTH 

Definition at line 35 of file actuators_sts3032.h.

Function Documentation

◆ actuators_sts3032_event()

void actuators_sts3032_event ( void )
extern

Definition at line 100 of file actuators_sts3032.c.

References sts, and sts3032_event().

Here is the call graph for this function:

◆ actuators_sts3032_init()

void actuators_sts3032_init ( void )
extern

Definition at line 88 of file actuators_sts3032.c.

References cbuf, framed_ring_buffer_init(), sts, and STS3032_RX_IDLE.

Here is the call graph for this function:

◆ actuators_sts3032_lock_eprom()

void actuators_sts3032_lock_eprom ( float lock)
extern

Definition at line 327 of file actuators_sts3032.c.

References sts, sts3032_current_id, sts3032_lock_eeprom(), and sts3032_lock_eprom.

Here is the call graph for this function:

◆ actuators_sts3032_move()

void actuators_sts3032_move ( float pos)
extern

Definition at line 333 of file actuators_sts3032.c.

References sts3032::pos, sts, sts3032_current_id, sts3032_move, and sts3032_write_pos().

Here is the call graph for this function:

◆ actuators_sts3032_periodic()

void actuators_sts3032_periodic ( void )
extern

Definition at line 105 of file actuators_sts3032.c.

References DefaultChannel, DefaultDevice, sts, and sts3032_read_pos().

Here is the call graph for this function:

◆ actuators_sts3032_set()

void actuators_sts3032_set ( uint8_t idx,
int16_t value )
extern

Definition at line 123 of file actuators_sts3032.c.

References idx, sts, sts3032_enabled, and sts3032_write_pos().

Here is the call graph for this function:

◆ actuators_sts3032_set_id()

void actuators_sts3032_set_id ( float future_id)
extern

Definition at line 321 of file actuators_sts3032.c.

References sts, sts3032_current_id, sts3032_future_id, and sts3032_set_id().

Here is the call graph for this function:

◆ actuators_sts3032_set_response_level()

void actuators_sts3032_set_response_level ( float level)
extern

Definition at line 339 of file actuators_sts3032.c.

References sts, sts3032_current_id, sts3032_response_level, and sts3032_set_response_level().

Here is the call graph for this function:

◆ id_idx()

uint8_t id_idx ( struct sts3032 * sts,
uint8_t id )
extern

Definition at line 226 of file actuators_sts3032.c.

References sts.

Referenced by handle_reply().

Here is the caller graph for this function:

◆ sts3032_write_pos()

void sts3032_write_pos ( struct sts3032 * sts,
uint8_t id,
int16_t position )
extern

Definition at line 265 of file actuators_sts3032.c.

References INST_WRITE, SMS_STS_GOAL_POSITION_L, sts, STS3032_RESPONSE_LEVEL, and write_buf().

Referenced by actuators_sts3032_move(), and actuators_sts3032_set().

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

Variable Documentation

◆ sts

◆ sts3032_current_id

◆ sts3032_enabled

int sts3032_enabled
extern

Definition at line 64 of file actuators_sts3032.c.

Referenced by actuators_sts3032_set().

◆ sts3032_future_id

int sts3032_future_id
extern

Definition at line 66 of file actuators_sts3032.c.

Referenced by actuators_sts3032_set_id().

◆ sts3032_lock_eprom

int sts3032_lock_eprom
extern

Definition at line 67 of file actuators_sts3032.c.

Referenced by actuators_sts3032_lock_eprom().

◆ sts3032_move

int sts3032_move
extern

Definition at line 68 of file actuators_sts3032.c.

Referenced by actuators_sts3032_move().

◆ sts3032_response_level

int sts3032_response_level
extern

Definition at line 69 of file actuators_sts3032.c.

Referenced by actuators_sts3032_set_response_level().