Skip to content

Commit

Permalink
Store all command parameters that are defined in mavlink
Browse files Browse the repository at this point in the history
This makes checksum calculation possible on both sides.
  • Loading branch information
MatejFranceskin committed Nov 2, 2021
1 parent 7742923 commit 5a8e576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/mavlink/mavlink_mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1389,8 +1389,8 @@ MavlinkMissionManager::parse_mavlink_mission_item(const mavlink_mission_item_t *

case MAV_CMD_NAV_TAKEOFF:
mission_item->nav_cmd = NAV_CMD_TAKEOFF;
mission_item->params[0] = mavlink_mission_item->param1; // Pitch
mission_item->yaw = wrap_2pi(math::radians(mavlink_mission_item->param4));

break;

case MAV_CMD_NAV_LOITER_TO_ALT:
Expand Down Expand Up @@ -1426,6 +1426,7 @@ MavlinkMissionManager::parse_mavlink_mission_item(const mavlink_mission_item_t *
case MAV_CMD_NAV_VTOL_TAKEOFF:
case MAV_CMD_NAV_VTOL_LAND:
mission_item->nav_cmd = (NAV_CMD)mavlink_mission_item->command;
mission_item->params[1] = mavlink_mission_item->param2; // Transition heading
mission_item->yaw = wrap_2pi(math::radians(mavlink_mission_item->param4));
break;

Expand Down

0 comments on commit 5a8e576

Please sign in to comment.