Is it possible these days to directly set the servo tilt RC channel with the RC_OVERRIDE_CHANNELS message, rather than emulating that using MANUAL_CONTROL button events? Based on some initial digging around, this is what I came up with, which works in the sense that if it sends 1650us, the servo will move up, 1350, it will move down, however it seems to be fairly inconsistent in that sometimes it will do nothing or will stutter, almost as if there is potentially some code in ardusub that is fighting against it sending 1500 (maybe some joystick handling code relating to how the mount_tilt functions are used?):
uint16_t NO_CHANGE = std::numeric_limits<uint16_t>::max();
uint16_t servo_val = static_cast<uint16_t>( ( _servo_position_target * 500.0f ) + 1500.0f );
mavlink_msg_rc_channels_override_pack(
CommManager::BRIDGE_MAVLINK_SYSTEM_ID,
CommManager::BRIDGE_MAVLINK_COMPONENT_ID,
&_msg_out,
CommManager::MCU_MAVLINK_SYSTEM_ID,
CommManager::MCU_MAVLINK_COMPONENT_ID,
NO_CHANGE, NO_CHANGE, NO_CHANGE, NO_CHANGE,
NO_CHANGE, NO_CHANGE, NO_CHANGE, servo_val,
NO_CHANGE, NO_CHANGE, NO_CHANGE, NO_CHANGE,
NO_CHANGE, NO_CHANGE, NO_CHANGE, NO_CHANGE,
NO_CHANGE, NO_CHANGE
);
_comm_manager.get_mavchannel().write( _msg_out );
Thanks for any insights.