About MAV_CMD with index greater than 256

Hi everyone!

I have a question regarding the MAV commands (like Waypoint, DO_SET_SERVO etc.). Recently my team has been experimenting with VTOL aircraft and are using the commands such as DO_VTOL_TRANSITION with command index 3000. The problem is in saving the autonomous missions: When you perform a  save the waypoint index equal to 3000 is written in the .waypoint file as 184 which then after reloading the waypoint list is  presenting itself as DO_REPEAT_SERVO command. I searched through the MP source code and pinpointed the cause to integer conversion to byte in the code part responsible for saving. At the same  time as I reviewed the code of the Mission Planner i discovered that the waypoint id  during writes to the autopilot is also stored in byte form meaning 0-255 command range.

The question I have is if this behaviour is correct - should I ignore waypoints changing the index after loading them from file as this behaviour is intended or is this a deeper problem within the Mission Planner assuming command has only one byte? On the autopilot side as i recall correctly it is stored in integer format.

I would be very grateful for some feedback, happy flying ;).

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    if you a refering to https://pixhawk.ethz.ch/mavlink/

    then that is showing mavlink version 2 spec.

    MP implements mavlink v1.0, under v1.0 it is a byte.

    • I see, it explains this behavior. But then our VTOL platform performs the transition as requested in the mission plan sent to autopilot although it shouldn't according to the implementation. '

      Thanks  for the explanation, I will look into solutions that support v2 commands.

      • Developer

        ardupilot is currently using mavlink v1.0

        I'm not aware of any autopilot using v2 atm

This reply was deleted.

Activity