add parsing of external attitude message

This commit is contained in:
Thomas Gubler
2014-07-15 10:34:56 +02:00
parent 7a06417411
commit d0cca02e97
3 changed files with 93 additions and 2 deletions
@@ -88,6 +88,7 @@ struct offboard_control_setpoint_s {
float attitude_rate[3]; /**< body angular rates (x, y, z) */
uint16_t ignore; /**< if field i is set to true, pi should be ignored */
//XXX define constants for bit offsets
bool isForceSetpoint; /**< the acceleration vector should be interpreted as force */
float override_mode_switch;
@@ -118,6 +119,11 @@ inline bool offboard_control_sp_ignore_bodyrates(const struct offboard_control_s
return (bool)(offboard_control_sp.ignore & (1 << (9 + index)));
}
inline bool offboard_control_sp_ignore_attitude(const struct offboard_control_setpoint_s &offboard_control_sp) {
return (bool)(offboard_control_sp.ignore & (1 << 10));
}
/* register this as object request broker structure */
ORB_DECLARE(offboard_control_setpoint);