|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/actuators/actuators_sts3032.h"#include "modules/datalink/telemetry.h"#include "string.h"#include "mcu_periph/uart.h"#include "mcu_periph/sys_time.h"#include <stdint.h>#include "peripherals/sts3032_regs.h"Go to the source code of this file.
Macros | |
| #define | STS3032_DEBUG FALSE |
| #define | STS3032_RESPONSE_LEVEL 0 |
| #define | STS3032_DELAY_MSG 1000 |
| #define | STS3032_DELAY_MSG_MIN 0 |
| #define | BUF_MAX_LENGHT 15 |
Variables | |
| struct sts3032 | sts |
| uint8_t | cbuf [50 *SERVOS_STS3032_NB] |
| uint8_t | buf_rx_param [255] |
| int | sts3032_enabled = 1 |
| int | sts3032_current_id = 1 |
| int | sts3032_future_id = 1 |
| int | sts3032_lock_eprom = 1 |
| int | sts3032_move = 1024 |
| int | sts3032_response_level = 0 |
| #define BUF_MAX_LENGHT 15 |
Definition at line 58 of file actuators_sts3032.c.
Referenced by sts3032_event(), and write_buf().
| #define STS3032_DEBUG FALSE |
Definition at line 40 of file actuators_sts3032.c.
| #define STS3032_DELAY_MSG 1000 |
Definition at line 51 of file actuators_sts3032.c.
Referenced by sts3032_event().
| #define STS3032_DELAY_MSG_MIN 0 |
Definition at line 55 of file actuators_sts3032.c.
Referenced by sts3032_event().
| #define STS3032_RESPONSE_LEVEL 0 |
Definition at line 44 of file actuators_sts3032.c.
Referenced by sts3032_enable_torque(), sts3032_lock_eeprom(), sts3032_set_id(), sts3032_set_response_level(), and sts3032_write_pos().
| void actuators_sts3032_event | ( | void | ) |
Definition at line 100 of file actuators_sts3032.c.
References sts, and sts3032_event().
| void actuators_sts3032_init | ( | void | ) |
Definition at line 88 of file actuators_sts3032.c.
References cbuf, framed_ring_buffer_init(), sts, and STS3032_RX_IDLE.
| void actuators_sts3032_lock_eprom | ( | float | lock | ) |
Definition at line 327 of file actuators_sts3032.c.
References sts, sts3032_current_id, sts3032_lock_eeprom(), and sts3032_lock_eprom.
| void actuators_sts3032_move | ( | float | pos | ) |
Definition at line 333 of file actuators_sts3032.c.
References sts3032::pos, sts, sts3032_current_id, sts3032_move, and sts3032_write_pos().
| void actuators_sts3032_periodic | ( | void | ) |
Definition at line 105 of file actuators_sts3032.c.
References DefaultChannel, DefaultDevice, sts, and sts3032_read_pos().
Definition at line 123 of file actuators_sts3032.c.
References idx, sts, sts3032_enabled, and sts3032_write_pos().
| void actuators_sts3032_set_id | ( | float | future_id | ) |
Definition at line 321 of file actuators_sts3032.c.
References sts, sts3032_current_id, sts3032_future_id, and sts3032_set_id().
| void actuators_sts3032_set_response_level | ( | float | level | ) |
Definition at line 339 of file actuators_sts3032.c.
References sts, sts3032_current_id, sts3032_response_level, and sts3032_set_response_level().
|
static |
Definition at line 199 of file actuators_sts3032.c.
References id_idx(), offset, SMS_STS_PRESENT_POSITION_L, state, and sts.
Referenced by sts3032_event().
Definition at line 226 of file actuators_sts3032.c.
References sts.
Referenced by handle_reply().
Definition at line 278 of file actuators_sts3032.c.
References INST_WRITE, SMS_STS_TORQUE_ENABLE, sts, STS3032_RESPONSE_LEVEL, and write_buf().
|
static |
Definition at line 131 of file actuators_sts3032.c.
References BUF_MAX_LENGHT, buf_rx_param, checksum, current_state, framed_ring_buffer_get(), get_sys_time_usec(), handle_reply(), sts, STS3032_DELAY_MSG, STS3032_DELAY_MSG_MIN, STS3032_RX_GOT_LENGTH, STS3032_RX_HEAD_OK, STS3032_RX_IDLE, uart_char_available(), uart_getch(), and uart_put_buffer().
Referenced by actuators_sts3032_event().
| void sts3032_init | ( | struct sts3032 * | sts, |
| struct uart_periph * | periph, | ||
| uint8_t * | cbuf, | ||
| size_t | cbuf_len ) |
Definition at line 237 of file actuators_sts3032.c.
References INST_WRITE, SMS_STS_LOCK, sts, STS3032_RESPONSE_LEVEL, and write_buf().
Referenced by actuators_sts3032_lock_eprom().
Definition at line 291 of file actuators_sts3032.c.
References INST_READ, sts, and write_buf().
Referenced by sts3032_read_pos().
Definition at line 286 of file actuators_sts3032.c.
References SMS_STS_PRESENT_POSITION_L, sts, and sts3032_read_mem().
Referenced by actuators_sts3032_periodic().
Definition at line 257 of file actuators_sts3032.c.
References INST_WRITE, SMS_STS_ID, sts, STS3032_RESPONSE_LEVEL, and write_buf().
Referenced by actuators_sts3032_set_id().
Definition at line 247 of file actuators_sts3032.c.
References INST_WRITE, SMS_STS_RESPONSE_LEVEL, sts, STS3032_RESPONSE_LEVEL, and write_buf().
Referenced by actuators_sts3032_set_response_level().
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().
|
static |
Definition at line 298 of file actuators_sts3032.c.
References BUF_MAX_LENGHT, checksum, framed_ring_buffer_put(), and sts.
Referenced by sts3032_enable_torque(), sts3032_lock_eeprom(), sts3032_read_mem(), sts3032_set_id(), sts3032_set_response_level(), and sts3032_write_pos().
| uint8_t buf_rx_param[255] |
Definition at line 59 of file actuators_sts3032.c.
Referenced by sts3032_event().
| uint8_t cbuf[50 *SERVOS_STS3032_NB] |
Definition at line 48 of file actuators_sts3032.c.
Referenced by actuators_sts3032_init(), and sts3032_init().
| struct sts3032 sts |
Definition at line 47 of file actuators_sts3032.c.
Referenced by actuators_sts3032_event(), actuators_sts3032_init(), actuators_sts3032_lock_eprom(), actuators_sts3032_move(), actuators_sts3032_periodic(), actuators_sts3032_set(), actuators_sts3032_set_id(), actuators_sts3032_set_response_level(), gec_clear_sts(), gec_sts_init(), handle_reply(), id_idx(), sts3032_enable_torque(), sts3032_event(), sts3032_init(), sts3032_lock_eeprom(), sts3032_read_mem(), sts3032_read_pos(), sts3032_set_id(), sts3032_set_response_level(), sts3032_write_pos(), and write_buf().
| int sts3032_current_id = 1 |
Definition at line 65 of file actuators_sts3032.c.
Referenced by actuators_sts3032_lock_eprom(), actuators_sts3032_move(), actuators_sts3032_set_id(), and actuators_sts3032_set_response_level().
| int sts3032_enabled = 1 |
Definition at line 64 of file actuators_sts3032.c.
Referenced by actuators_sts3032_set().
| int sts3032_future_id = 1 |
Definition at line 66 of file actuators_sts3032.c.
Referenced by actuators_sts3032_set_id().
| int sts3032_lock_eprom = 1 |
Definition at line 67 of file actuators_sts3032.c.
Referenced by actuators_sts3032_lock_eprom().
| int sts3032_move = 1024 |
Definition at line 68 of file actuators_sts3032.c.
Referenced by actuators_sts3032_move().
| int sts3032_response_level = 0 |
Definition at line 69 of file actuators_sts3032.c.
Referenced by actuators_sts3032_set_response_level().