35 #if PERIODIC_TELEMETRY
41 pprz_msg_send_BEBOP_ACTUATORS(trans, dev, AC_ID,
68 #if PERIODIC_TELEMETRY
125 #pragma GCC diagnostic push
126 #pragma GCC diagnostic ignored "-Wcast-qual"
128 #pragma GCC diagnostic pop
147 for (
int i = 0; i < size; i++) {
148 checksum = checksum ^ bytes[i];
#define ACTUATORS_BEBOP_SET_REF_SPEED
Set reference speed.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
Periodic telemetry system header (includes downlink utility and generated code).
bool autopilot_get_motors_on(void)
get motors status
void actuators_bebop_commit(void)
Main include for ABI (AirBorneInterface).
float vsupply
supply voltage in V
#define ACTUATORS_BEBOP_ADDR
#define ACTUATORS_BEBOP_TOGGLE_GPIO
Toggle GPIO (reset, red led, green led)
uint16_t rpm_obs[4]
Observed RPM.
bool i2c_blocking_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction and wait for it to complete.
Hardware independent API for actuators (servos, motor controllers).
#define ACTUATORS_BEBOP_CLEAR_ERROR
Clear all current erros.
transaction set to done by user level
Interface for electrical status: supply voltage, current, battery status, etc.
uint8_t led
Current led status.
#define DefaultPeriodic
Set default periodic telemetry.
static uint8_t actuators_bebop_checksum(uint8_t *bytes, uint8_t size)
enum I2CTransactionStatus status
Transaction status.
static const struct usb_device_descriptor dev
#define ACTUATORS_BEBOP_GET_OBS_DATA
Get observation data.
Core autopilot interface common to all firmwares.
uint8_t slave_addr
Slave address.
General stabilization interface for rotorcrafts.
void autopilot_set_motors_on(bool motors_on)
turn motors on/off, eventually depending of the current mode set kill_throttle accordingly FIXME is i...
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
#define ACTUATORS_BEBOP_STOP_PROP
Stop the propellers.
struct Electrical electrical
struct ActuatorsBebop actuators_bebop
static void send_bebop_actuators(struct transport_tx *trans, struct link_device *dev)
uint16_t rpm_ref[4]
Reference RPM.
Actuator driver for the bebop.
struct i2c_transaction i2c_trans
I2C transaction for communicating with the bebop BLDC driver.
void actuators_bebop_init(void)
#define ACTUATORS_BEBOP_START_PROP
Start the propellers.
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
bool i2c_blocking_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction and wait for it to complete.