|  | Paparazzi UAS v7.0_unstable
    Paparazzi is a free software Unmanned Aircraft System. | 
Actuator driver for the Parrot Disco. More...
#include "modules/actuators/actuators.h"#include "modules/energy/electrical.h"#include "actuators.h"#include "autopilot.h"#include "modules/core/abi.h"#include <endian.h>#include <string.h>#include <stdio.h> Include dependency graph for actuators.c:
 Include dependency graph for actuators.c:Go to the source code of this file.
| Data Structures | |
| struct | disco_bldc_obs | 
| private observation structure  More... | |
| Macros | |
| #define | DISCO_BLDC_STATUS_STOPPED 1 | 
| #define | DISCO_BLDC_STATUS_RAMPUP 2 | 
| #define | DISCO_BLDC_STATUS_RUNNING 4 | 
| #define | DISCO_BLDC_STATUS_RAMPDOWN 5 | 
| #define | DISCO_BLDC_START_MOTOR_THRESHOLD 1100 | 
| Functions | |
| static uint8_t | actuators_disco_checksum (uint8_t *bytes, uint8_t size) | 
| void | actuators_disco_init (void) | 
| void | actuators_disco_set (uint8_t idx, uint16_t val) | 
| void | actuators_disco_commit (void) | 
| Variables | |
| struct disco_bldc_obs | obs_data | 
| static uint8_t | disco_channels [] = { 4, 5, 6, 1, 2, 3 } | 
| Internal mapping of the PWM with output index servo rail 1 <-> linux pwm_4 servo rail 2 <-> linux pwm_5 servo rail 3 <-> linux pwm_6 servo rail 4 <-> linux pwm_1 servo rail 5 <-> linux pwm_2 servo rail 6 <-> linux pwm_3. | |
| struct ActuatorsDisco | actuators_disco | 
Actuator driver for the Parrot Disco.
Disco plane is using the same ESC (I2C) as a Parrot Bebop for its motor and Pwm_sysfs linux driver for the PWM outputs
Some part of this code is coming from the APM Disco and Bebop drivers
Definition in file actuators.c.
| struct disco_bldc_obs | 
| #define DISCO_BLDC_START_MOTOR_THRESHOLD 1100 | 
Definition at line 84 of file actuators.c.
| #define DISCO_BLDC_STATUS_RAMPDOWN 5 | 
Definition at line 79 of file actuators.c.
| #define DISCO_BLDC_STATUS_RAMPUP 2 | 
Definition at line 77 of file actuators.c.
| #define DISCO_BLDC_STATUS_RUNNING 4 | 
Definition at line 78 of file actuators.c.
| #define DISCO_BLDC_STATUS_STOPPED 1 | 
Definition at line 76 of file actuators.c.
Definition at line 184 of file actuators.c.
References checksum.
Referenced by actuators_disco_commit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 113 of file actuators.c.
References ACT_FEEDBACK_BOARD_ID, actuators_disco, actuators_disco_checksum(), ACTUATORS_DISCO_CLEAR_ERROR, ACTUATORS_DISCO_GET_OBS_DATA, ACTUATORS_DISCO_SET_REF_SPEED, ACTUATORS_DISCO_START_PROP, ACTUATORS_DISCO_STOP_PROP, autopilot_set_kill_throttle(), disco_bldc_obs::batt_mv, i2c_transaction::buf, DISCO_BLDC_START_MOTOR_THRESHOLD, DISCO_BLDC_STATUS_RAMPUP, DISCO_BLDC_STATUS_RUNNING, DISCO_BLDC_STATUS_STOPPED, electrical, disco_bldc_obs::error, foo, i2c_blocking_transceive(), i2c_blocking_transmit(), ActuatorsDisco::i2c_trans, act_feedback_t::idx, ActuatorsDisco::motor_rpm, obs_data, disco_bldc_obs::rpm, act_feedback_t::act_feedback_set_t::rpm, act_feedback_t::rpm, ActuatorsDisco::rpm_obs, ActuatorsDisco::rpm_saturated, act_feedback_t::set, i2c_transaction::slave_addr, disco_bldc_obs::status, true, and Electrical::vsupply.
 Here is the call graph for this function:
 Here is the call graph for this function:Definition at line 89 of file actuators.c.
References actuators_disco, ACTUATORS_DISCO_ADDR, ACTUATORS_DISCO_PWM_NB, disco_channels, ActuatorsDisco::i2c_trans, I2CTransDone, ActuatorsDisco::motor_rpm, ActuatorsDisco::pwm, pwm_sysfs_init(), i2c_transaction::slave_addr, and i2c_transaction::status.
 Here is the call graph for this function:
 Here is the call graph for this function:Definition at line 101 of file actuators.c.
References actuators_disco, ACTUATORS_DISCO_MOTOR_IDX, ACTUATORS_DISCO_PWM_NB, idx, ActuatorsDisco::motor_rpm, ActuatorsDisco::pwm, pwm_sysfs_set_duty(), and val.
 Here is the call graph for this function:
 Here is the call graph for this function:| struct ActuatorsDisco actuators_disco | 
Definition at line 86 of file actuators.c.
Referenced by actuators_disco_commit(), actuators_disco_init(), and actuators_disco_set().
| 
 | static | 
Internal mapping of the PWM with output index servo rail 1 <-> linux pwm_4 servo rail 2 <-> linux pwm_5 servo rail 3 <-> linux pwm_6 servo rail 4 <-> linux pwm_1 servo rail 5 <-> linux pwm_2 servo rail 6 <-> linux pwm_3.
Definition at line 74 of file actuators.c.
Referenced by actuators_disco_init().
| struct disco_bldc_obs obs_data | 
Referenced by actuators_disco_commit().