Copter: add get_angle_targets_for_reporting
This returns the current earth frame roll, pitch and yaw targets which can depend upon the flight mode
This commit is contained in:
parent
1acd33e290
commit
d579325e2a
@ -276,3 +276,15 @@ print_flight_mode(AP_HAL::BetterStream *port, uint8_t mode)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get_angle_targets_for_reporting() - returns 3d vector of roll, pitch and yaw target angles for logging and reporting to GCS
|
||||||
|
static void get_angle_targets_for_reporting(Vector3f& targets)
|
||||||
|
{
|
||||||
|
if (control_mode == ACRO) {
|
||||||
|
targets.x = 0;
|
||||||
|
targets.y = 0;
|
||||||
|
targets.y = 0;
|
||||||
|
}else{
|
||||||
|
targets = attitude_control.angle_ef_targets();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user