forked from Archive/PX4-Autopilot
Waypoints: reverse param1 and param2
This commit is contained in:
parent
1c7e07d8d7
commit
d3a71d1e42
|
@ -105,10 +105,10 @@ int map_mavlink_mission_item_to_mission_item(const mavlink_mission_item_t *mavli
|
||||||
|
|
||||||
switch (mavlink_mission_item->command) {
|
switch (mavlink_mission_item->command) {
|
||||||
case MAV_CMD_NAV_TAKEOFF:
|
case MAV_CMD_NAV_TAKEOFF:
|
||||||
mission_item->pitch_min = mavlink_mission_item->param1;
|
mission_item->pitch_min = mavlink_mission_item->param2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mission_item->radius = mavlink_mission_item->param1;
|
mission_item->radius = mavlink_mission_item->param2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ int map_mavlink_mission_item_to_mission_item(const mavlink_mission_item_t *mavli
|
||||||
mission_item->loiter_direction = (mavlink_mission_item->param3 > 0) ? 1 : -1; /* 1 if positive CW, -1 if negative CCW */
|
mission_item->loiter_direction = (mavlink_mission_item->param3 > 0) ? 1 : -1; /* 1 if positive CW, -1 if negative CCW */
|
||||||
mission_item->nav_cmd = mavlink_mission_item->command;
|
mission_item->nav_cmd = mavlink_mission_item->command;
|
||||||
|
|
||||||
mission_item->time_inside = mavlink_mission_item->param2 / 1e3f; /* from milliseconds to seconds */
|
mission_item->time_inside = mavlink_mission_item->param1 / 1e3f; /* from milliseconds to seconds */
|
||||||
mission_item->autocontinue = mavlink_mission_item->autocontinue;
|
mission_item->autocontinue = mavlink_mission_item->autocontinue;
|
||||||
mission_item->index = mavlink_mission_item->seq;
|
mission_item->index = mavlink_mission_item->seq;
|
||||||
mission_item->origin = ORIGIN_MAVLINK;
|
mission_item->origin = ORIGIN_MAVLINK;
|
||||||
|
@ -135,10 +135,10 @@ int map_mission_item_to_mavlink_mission_item(const struct mission_item_s *missio
|
||||||
|
|
||||||
switch (mission_item->nav_cmd) {
|
switch (mission_item->nav_cmd) {
|
||||||
case NAV_CMD_TAKEOFF:
|
case NAV_CMD_TAKEOFF:
|
||||||
mavlink_mission_item->param1 = mission_item->pitch_min;
|
mavlink_mission_item->param2 = mission_item->pitch_min;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mavlink_mission_item->param1 = mission_item->radius;
|
mavlink_mission_item->param2 = mission_item->radius;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ int map_mission_item_to_mavlink_mission_item(const struct mission_item_s *missio
|
||||||
mavlink_mission_item->param4 = mission_item->yaw*M_RAD_TO_DEG_F;
|
mavlink_mission_item->param4 = mission_item->yaw*M_RAD_TO_DEG_F;
|
||||||
mavlink_mission_item->param3 = mission_item->loiter_radius*(float)mission_item->loiter_direction;
|
mavlink_mission_item->param3 = mission_item->loiter_radius*(float)mission_item->loiter_direction;
|
||||||
mavlink_mission_item->command = mission_item->nav_cmd;
|
mavlink_mission_item->command = mission_item->nav_cmd;
|
||||||
mavlink_mission_item->param2 = mission_item->time_inside * 1e3f; /* from seconds to milliseconds */
|
mavlink_mission_item->param1 = mission_item->time_inside * 1e3f; /* from seconds to milliseconds */
|
||||||
mavlink_mission_item->autocontinue = mission_item->autocontinue;
|
mavlink_mission_item->autocontinue = mission_item->autocontinue;
|
||||||
mavlink_mission_item->seq = mission_item->index;
|
mavlink_mission_item->seq = mission_item->index;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue