Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequence is required but ignored #79

Open
clydemcqueen opened this issue Jul 10, 2023 · 0 comments
Open

sequence is required but ignored #79

clydemcqueen opened this issue Jul 10, 2023 · 0 comments

Comments

@clydemcqueen
Copy link

The API requires that we send a MAVLink sequence number, but it is ignored.

E.g., this API call fails:

curl --verbose http://127.0.0.1:6040/mavlink -H "accept: application/json" --data \
'{
    "header": {
        "system_id": 255,
        "component_id": 240,
    },
    "message": {
        "type": "COMMAND_LONG",
        "param1": 1.0,
        "param2": 0.0,
        "param3": 0.0,
        "param4": 0.0,
        "param5": 0.0,
        "param6": 0.0,
        "param7": 0.0,
        "command": {"type": "MAV_CMD_COMPONENT_ARM_DISARM"},
        "target_system": 1,
        "target_component": 1,
        "confirmation": 1
    }
}'

while this one succeeds:

curl --verbose http://127.0.0.1:6040/mavlink -H "accept: application/json" --data \
'{
    "header": {
        "system_id": 255,
        "component_id": 240,
        "sequence": 0
    },
    "message": {
        "type": "COMMAND_LONG",
        "param1": 1.0,
        "param2": 0.0,
        "param3": 0.0,
        "param4": 0.0,
        "param5": 0.0,
        "param6": 0.0,
        "param7": 0.0,
        "command": {"type": "MAV_CMD_COMPONENT_ARM_DISARM"},
        "target_system": 1,
        "target_component": 1,
        "confirmation": 1
    }
}'

but the sequence number that appears in the packet is set by the MAVLink library, not by the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant