mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Navigation: Turn mission item into packed struct and make nav_cmd compiler-independent
This commit is contained in:
parent
6828e4db2c
commit
557fd3d99b
@ -81,6 +81,7 @@ enum ORIGIN {
|
||||
* This is the position the MAV is heading towards. If it of type loiter,
|
||||
* the MAV is circling around it with the given loiter radius in meters.
|
||||
*/
|
||||
#pragma pack(push, 1)
|
||||
struct mission_item_s {
|
||||
bool altitude_is_relative; /**< true if altitude is relative from start point */
|
||||
double lat; /**< latitude in degrees */
|
||||
@ -89,19 +90,19 @@ struct mission_item_s {
|
||||
float yaw; /**< in radians NED -PI..+PI, NAN means don't change yaw */
|
||||
float loiter_radius; /**< loiter radius in meters, 0 for a VTOL to hover */
|
||||
int8_t loiter_direction; /**< 1: positive / clockwise, -1, negative. */
|
||||
enum NAV_CMD nav_cmd; /**< navigation command */
|
||||
unsigned nav_cmd; /**< navigation command */
|
||||
float acceptance_radius; /**< default radius in which the mission is accepted as reached in meters */
|
||||
float time_inside; /**< time that the MAV should stay inside the radius before advancing in seconds */
|
||||
float pitch_min; /**< minimal pitch angle for fixed wing takeoff waypoints */
|
||||
bool autocontinue; /**< true if next waypoint should follow after this one */
|
||||
enum ORIGIN origin; /**< where the waypoint has been generated */
|
||||
unsigned origin; /**< where the waypoint has been generated */
|
||||
int do_jump_mission_index; /**< index where the do jump will go to */
|
||||
unsigned do_jump_repeat_count; /**< how many times do jump needs to be done */
|
||||
unsigned do_jump_current_count; /**< count how many times the jump has been done */
|
||||
int actuator_num; /**< actuator number to be set 0..5 ( corresponds to AUX outputs 1..6 */
|
||||
int actuator_value; /**< new value for selected actuator in ms 900...2000 */
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
#include <uORB/topics/mission.h>
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user