Johnw11 / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

improper implementation of mavlink parameter protocol #552

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description:
https://code.google.com/p/ardupilot-mega/issues/detail?id=872

I couldn't get "git clone https://code.google.com/p/ardupilot-mega/" compiled 
(eclipse & arduino ide on ubuntu) so I used 
"http://code.google.com/p/arducopter/downloads/detail?name=ArduCopter-2.9.1.zip"
 for fixing said bug.

diff:
http://pastebin.com/NGPwN6ys

Summary:
- libraries/GCS_MAVLink/GCS_MAVLink.* :
    - added function for storing AP_Param in float
    - removed now obsolete "uint8_t mav_var_type(enum ap_var_type t);"

- libraries/GCS_MAVLink/include/mavlink/v1.0/common/common.h :
    - added missing enum MAV_PARAM_TYPE (https://pixhawk.ethz.ch/mavlink/)

- ArduCopter/GCS_Mavlink.pde :
    - replaced cast_to_float() calls by store_AP_Param_in_float(...)
    - adapted the MAVLINK_MSG_ID_PARAM_SET code for converting the parameter sent as a float to an AP_Param (BTW: the "rounding_addition" had no effect)

- ArduCopter-2.9.1_zip/libraries/APO :
    - removed because:
        - not used
        - ./AP_CommLink.cpp contains the same wrong implementation of the protocol

Original issue reported on code.google.com by eilstach...@googlemail.com on 27 Feb 2013 at 3:08

GoogleCodeExporter commented 9 years ago
I forgot to mention something:

TESTING:
- getting and setting parameters works with qgroundcontrol as expected:
    - too large/small integers are set to the AP_Param's internal type's min/max e.g. when setting SYSID_SW_TYPE (int8_t) to 1234 the APM reports back 127

Original comment by eilstach...@googlemail.com on 27 Feb 2013 at 3:41

GoogleCodeExporter commented 9 years ago
Closing all issues on the old issues list by marking them WontFix.

If this is still a valid issue please re-raise it on the new GitHub issues 
list: https://github.com/diydrones/ardupilot/issues

Thanks!

Original comment by rmackay...@gmail.com on 21 Jul 2013 at 2:14