QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MockLinkGimbal Class Reference

#include <MockLinkGimbal.h>

Public Member Functions

 MockLinkGimbal (MockLink *mockLink, bool hasRollAxis=true, bool hasPitchAxis=true, bool hasYawAxis=true, bool hasYawFollow=true, bool hasYawLock=true, bool hasRetract=true, bool hasNeutral=true)
 
 ~MockLinkGimbal ()=default
 
void run1HzTasks ()
 Send periodic gimbal status messages (call from 1Hz tasks)
 
bool handleMavlinkMessage (const mavlink_message_t &msg)
 

Detailed Description

Simulates MAVLink Gimbal Manager Protocol for MockLink.

Supports a Gimbal Manager on MAV_COMPID_AUTOPILOT1 with a single gimbal device with the id MAV_COMP_ID_GIMBAL. Gimbal attitude is simulated with a slow oscillation when not under manual control.

Gimbal capabilities are configurable via MockLink config.

Supported MAVLink messages / commands: MAV_CMD_REQUEST_MESSAGE (GIMBAL_MANAGER_INFORMATION) MAV_CMD_SET_MESSAGE_INTERVAL (GIMBAL_MANAGER_STATUS, GIMBAL_DEVICE_ATTITUDE_STATUS) MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE Periodic sending of GIMBAL_MANAGER_STATUS and GIMBAL_DEVICE_ATTITUDE_STATUS

Definition at line 25 of file MockLinkGimbal.h.

Constructor & Destructor Documentation

◆ MockLinkGimbal()

MockLinkGimbal::MockLinkGimbal ( MockLink mockLink,
bool  hasRollAxis = true,
bool  hasPitchAxis = true,
bool  hasYawAxis = true,
bool  hasYawFollow = true,
bool  hasYawLock = true,
bool  hasRetract = true,
bool  hasNeutral = true 
)
explicit

Definition at line 11 of file MockLinkGimbal.cc.

◆ ~MockLinkGimbal()

MockLinkGimbal::~MockLinkGimbal ( )
default

Member Function Documentation

◆ handleMavlinkMessage()

bool MockLinkGimbal::handleMavlinkMessage ( const mavlink_message_t msg)

Handle all incoming MAVLink messages for gimbal.

Returns
true if the message was handled by the gimbal

Definition at line 67 of file MockLinkGimbal.cc.

◆ run1HzTasks()

void MockLinkGimbal::run1HzTasks ( )

Send periodic gimbal status messages (call from 1Hz tasks)

Definition at line 31 of file MockLinkGimbal.cc.

Referenced by MockLink::run1HzTasks().


The documentation for this class was generated from the following files: