Describe the bug
PX4 rejects unsupported MAV_CMD in mission items with MAV_MISSION_UNSUPPORTED, and commands with MAV_RESULT_UNSUPPORTED.
However it should also reject unsupported params in supported commands that are set to anything other than NaN (or INT32MAX for param5,6), in both cases.
Instead PX4 silently accepts the MAV_CMD.
This seems kind, because the missions seem to work. However it's not, because users have no way to know that the mission doesn't do what they want until it fails.
This is also a problem for params that have no definition in the commands, because users may set them to any value, such as zero, by default. If the command is later updated to take a value, this will cause unexpected behaviour in code/missions that formerly just worked. Those values must reject non-NAN/INT32MAX values.
I am not sure how to fix this efficiently.
I think we need two uint8 bitmask objects for each supported mav_cmd providing flags set true to indicate which params are supported in command and missions, respectively. We could can then use these to test and reject non-NaN or non-INT32MAX passed in.
Flight Log / Additional Information
No response
Describe the bug
PX4 rejects unsupported MAV_CMD in mission items with MAV_MISSION_UNSUPPORTED, and commands with MAV_RESULT_UNSUPPORTED.
However it should also reject unsupported params in supported commands that are set to anything other than
NaN(orINT32MAXfor param5,6), in both cases.Instead PX4 silently accepts the MAV_CMD.
This seems kind, because the missions seem to work. However it's not, because users have no way to know that the mission doesn't do what they want until it fails.
This is also a problem for params that have no definition in the commands, because users may set them to any value, such as zero, by default. If the command is later updated to take a value, this will cause unexpected behaviour in code/missions that formerly just worked. Those values must reject non-NAN/INT32MAX values.
I am not sure how to fix this efficiently.
I think we need two uint8 bitmask objects for each supported mav_cmd providing flags set true to indicate which params are supported in command and missions, respectively. We could can then use these to test and reject non-NaN or non-INT32MAX passed in.
Flight Log / Additional Information
No response