Closed TSC21 closed 9 years ago
@vooon APM has support for this now. I will add PX4 support if required.
Can't find how they do it in the code.
But seen PR for AUTOPILOT_VERSION_REQUEST
, and as i remember @LorenzMeier wanted to send AUTOPILOT_VERSION
periodically.
APM now sends AUTOPILOT_VERSION
in response to command MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES
.
@vooon AUTOPILOT_CAPABILITIES
is already supported on Firmware (https://github.com/PX4/Firmware/pull/2181). But testing it on mavros node start gave this result:
[ INFO] [1432376904.331698271]: VER: Capabilities 0x00000000000004eb
[ INFO] [1432376904.331779081]: VER: Flight software: 00000000 (j?#Q6I`j?#Q6I`)
[ INFO] [1432376904.331814379]: VER: Middleware software: 00000000 (j?#Q6I`)
[ INFO] [1432376904.331850687]: VER: OS software: 00000000 ( )
[ INFO] [1432376904.331881663]: VER: Board hardware: 00000000
[ INFO] [1432376904.331912500]: VER: VID/PID: 26ac:0011
[ INFO] [1432376904.331939803]: VER: UID: 3432470a31323533
Something must not be right. Can't tell if this is on mavros side or firmware side.
Its mavros. It should be printing the 8 bytes as hex, not as characters.
Ok. I'll see what I can do then. Thanks!
Update: I think the reason is the APM sending the custom version array[8] as a string, as @vooon stated here: https://github.com/mavlink/mavros/commit/f07ca08c99a5d30f63a351003d1e4a12e49a769c#diff-e6ca3412eb7b4e4e7caab100190b2b9eR577 (can be seen here: https://github.com/diydrones/ardupilot/blob/78f02634d00a0962da4a3d15ed56e594cd40022d/libraries/GCS_MAVLink/GCS_Common.cpp#L1263). So code is adapted to APM. @LorenzMeier any reason custom version should be sent as strings?
New message definitions has AUTOPILOT_VERSION, which can be useful to add to sys_status plugin.
Added by @vooon: