|
Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Actuator driver for the disco. More...
Include dependency graph for actuators.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | ActuatorsDisco |
Macros | |
| #define | ACTUATORS_DISCO_ADDR 0x10 |
| #define | ACTUATORS_DISCO_SET_REF_SPEED 0x02 |
| Set reference speed. More... | |
| #define | ACTUATORS_DISCO_GET_OBS_DATA 0x20 |
| Get observation data. More... | |
| #define | ACTUATORS_DISCO_START_PROP 0x40 |
| Start the propellers. More... | |
| #define | ACTUATORS_DISCO_TOGGLE_GPIO 0x4D |
| Toggle GPIO (reset, red led, green led) More... | |
| #define | ACTUATORS_DISCO_STOP_PROP 0x60 |
| Stop the propellers. More... | |
| #define | ACTUATORS_DISCO_CLEAR_ERROR 0x80 |
| Clear all current erros. More... | |
| #define | ACTUATORS_DISCO_PLAY_SOUND 0x82 |
| Play a sound (0=stop, 1=short beep, 2=boot beep, 3=Be-Bop-Ah-Lula, negative=repeat) More... | |
| #define | ACTUATORS_DISCO_GET_INFO 0xA0 |
| Get version information. More... | |
| #define | ACTUATORS_DISCO_PWM_NB 6 |
| Max number of PWM channels. More... | |
| #define | ACTUATORS_DISCO_MOTOR_IDX 0 |
| Index for motor BLDC. More... | |
| #define | ActuatorsDiscoSet(_i, _v) actuators_disco_set(_i, _v) |
| #define | ActuatorsDiscoCommit() actuators_disco_commit() |
| #define | ActuatorsDiscoInit() actuators_disco_init() |
Functions | |
| void | actuators_disco_set (uint8_t idx, uint16_t val) |
| void | actuators_disco_commit (void) |
| void | actuators_disco_init (void) |
Variables | |
| struct ActuatorsDisco | actuators_disco |
Actuator driver for the disco.
Disco plane is using the same ESC (I2C) than bebop for its motor and Pwm_sysfs linux driver for the PWM outputs
Definition in file actuators.h.
| struct ActuatorsDisco |
Definition at line 54 of file actuators.h.
Collaboration diagram for ActuatorsDisco:| Data Fields | ||
|---|---|---|
| struct i2c_transaction | i2c_trans | I2C transaction for communicating with the bebop BLDC driver. |
| uint16_t | motor_rpm | Motor RPM setpoint. |
| struct PWM_Sysfs | pwm[ACTUATORS_DISCO_PWM_NB] | Array of PWM outputs. |
| uint16_t | rpm_obs | Measured RPM. |
| bool | rpm_saturated | RPM saturation flag (bit 15 in obs data) |
| uint8_t | status | Status flag. |
| #define ACTUATORS_DISCO_ADDR 0x10 |
Definition at line 38 of file actuators.h.
Referenced by actuators_disco_init().
| #define ACTUATORS_DISCO_CLEAR_ERROR 0x80 |
Clear all current erros.
Definition at line 46 of file actuators.h.
Referenced by actuators_disco_commit().
| #define ACTUATORS_DISCO_GET_INFO 0xA0 |
Get version information.
Definition at line 48 of file actuators.h.
| #define ACTUATORS_DISCO_GET_OBS_DATA 0x20 |
Get observation data.
Definition at line 42 of file actuators.h.
Referenced by actuators_disco_commit().
| #define ACTUATORS_DISCO_MOTOR_IDX 0 |
Index for motor BLDC.
Definition at line 52 of file actuators.h.
Referenced by actuators_disco_set().
| #define ACTUATORS_DISCO_PLAY_SOUND 0x82 |
Play a sound (0=stop, 1=short beep, 2=boot beep, 3=Be-Bop-Ah-Lula, negative=repeat)
Definition at line 47 of file actuators.h.
| #define ACTUATORS_DISCO_PWM_NB 6 |
Max number of PWM channels.
Definition at line 51 of file actuators.h.
Referenced by actuators_disco_init(), and actuators_disco_set().
| #define ACTUATORS_DISCO_SET_REF_SPEED 0x02 |
Set reference speed.
Definition at line 41 of file actuators.h.
Referenced by actuators_disco_commit().
| #define ACTUATORS_DISCO_START_PROP 0x40 |
Start the propellers.
Definition at line 43 of file actuators.h.
Referenced by actuators_disco_commit().
| #define ACTUATORS_DISCO_STOP_PROP 0x60 |
Stop the propellers.
Definition at line 45 of file actuators.h.
Referenced by actuators_disco_commit().
| #define ACTUATORS_DISCO_TOGGLE_GPIO 0x4D |
Toggle GPIO (reset, red led, green led)
Definition at line 44 of file actuators.h.
| #define ActuatorsDiscoCommit | ( | ) | actuators_disco_commit() |
Definition at line 64 of file actuators.h.
| #define ActuatorsDiscoInit | ( | ) | actuators_disco_init() |
Definition at line 65 of file actuators.h.
| #define ActuatorsDiscoSet | ( | _i, | |
| _v | |||
| ) | actuators_disco_set(_i, _v) |
Definition at line 63 of file actuators.h.
| void actuators_disco_commit | ( | void | ) |
Definition at line 108 of file actuators.c.
References 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, ActuatorsDisco::i2c_trans, i2c_transceive(), i2c_transmit(), ActuatorsDisco::motor_rpm, obs_data, disco_bldc_obs::rpm, ActuatorsDisco::rpm_obs, ActuatorsDisco::rpm_saturated, RPM_SENSOR_ID, i2c_transaction::slave_addr, disco_bldc_obs::status, and Electrical::vsupply.
Here is the call graph for this function:| void actuators_disco_init | ( | void | ) |
Definition at line 84 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:Definition at line 96 of file actuators.c.
References actuators_disco, ACTUATORS_DISCO_MOTOR_IDX, ACTUATORS_DISCO_PWM_NB, ActuatorsDisco::motor_rpm, ActuatorsDisco::pwm, pwm_sysfs_set_duty(), and val.
Here is the call graph for this function:| struct ActuatorsDisco actuators_disco |
Definition at line 81 of file actuators.c.
Referenced by actuators_disco_commit(), actuators_disco_init(), and actuators_disco_set().