Mavlink update causing issue to type_mask in SET_ATTITUDE_TARGET_DATA

Hi, I have just updated my mavlink from 0.9.0 to 0.11.2 , Initially I was defining type_mask as i32 but now it takes ardupilotmega::SET_ATTITUDE_TARGET_DATA , please suggest me how can I use it now

My current code looks like

let type_mask = 128;

let data = ardupilotmega::SET_ATTITUDE_TARGET_DATA {
            time_boot_ms: 0,
            target_system: 1,
            target_component: 1,
            type_mask, }

If you look at the documentation for ATTITUDE_TARGET_TYPEMASK, you'll see that type mask 128 corresponds to ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE. Also, if you look in the documentation for ardupilotmega::SET_ATTITUDE_TARGET_DATA, you'll see that the type_mask field expects a value of type ardupilotmega::AttitudeTargetTypemask. Therefore, you should set type_mask to ardupilotmega::AttitudeTargetTypemask::ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.