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

NAMED_VALUE_FLOAT is invalid message #52

Closed
1chick opened this issue Jul 14, 2022 · 4 comments
Closed

NAMED_VALUE_FLOAT is invalid message #52

1chick opened this issue Jul 14, 2022 · 4 comments

Comments

@1chick
Copy link

1chick commented Jul 14, 2022

pi@raspberrypi:~/companion $ curl --request POST http://0.0.0.0:8088/mavlink -H "Content-Type: application/json" --data '{
"header": {
"system_id": 255,
"component_id": 0,
"sequence": 0
},
"message": {
"type":"NAMED_VALUE_FLOAT",
"time_boot_ms":0,
"name":"leak",
"value":0.0
}
}'
Failed to parse message, not a valid MAVLinkMessage.

@1chick
Copy link
Author

1chick commented Jul 15, 2022

message changed to it ,getcha

'{
"header": {
"system_id": 255,
"component_id": 0,
"sequence": 0
},
"message": {
"type": "NAMED_VALUE_FLOAT",
"time_boot_ms": 0,
"value": 2.0,
"name": [
"l",
"e",
"a",
"k",
"\u0000",
"\u0000",
"\u0000",
"\u0000",
"\u0000",
"\u0000"
]
}
}'

@1chick 1chick closed this as completed Jul 15, 2022
@patrickelectric
Copy link
Member

Hi @1chick,

I would recommend to check the helper endpoint for message example:

 curl http://blueos.local:6040/helper/mavlink\?name\=NAMED_VALUE_FLOAT                               
{
  "header": {
    "system_id": 255,
    "component_id": 0,
    "sequence": 0
  },
  "message": {
    "type": "NAMED_VALUE_FLOAT",
    "time_boot_ms": 0,
    "value": 0.0,
    "name": [
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000",
      "\u0000"
    ]
  }
}%                                                       

@1chick
Copy link
Author

1chick commented Jul 19, 2022

Thanks @patrickelectric bro!
the NAMED_VALUE_FLOAT message directly can not be sent to GCS by mavlink2rest, have to edit the code logic in ardusub's firmware function GCS_MAVLINK_Sub::handleMessage. is it right?

@1chick
Copy link
Author

1chick commented Jul 27, 2022

hi bro @patrickelectric
when post data,it response slowly,sometime need 40s. how to Optimize?

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

2 participants