excuse me, but i don't understand how to achieve my goal(
I tried to add flag MAV_MODE_FLAG_HIL_ENABLED to mode bitmask as you said. After sending MAV_CMD_DO_SET_MODE command with 1st parameter = MAV_MODE_FLAG_HIL_ENABLED | MAV_MODE_GUIDED_ARMED and BM and CM corresponding to "Offboard", flight mode changes to "Position", not "Offboard". And vehicle still hasn't any reaction on SET_POSITION_TARGET_LOCAL_NED messages.
could you please provide a step-by-step instructions for switching vehicle to offboard mode if it possible?
btw, it seems that firmware in master branch have bugs when works in hil mode - coordinates changes as Flash from DC comics, relative altitude sometimes is negative, although i'm flying above more or less smooth landscape.
upd now i'm able to switch to Offboard mode using deprecated SET_MODE command. But after doing that HIL is being disabled. How to switch to Offboard with preserving HIL using MAV_DO_SET_MODE command?