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

#include <MotorAssignment.h>

+ Inheritance diagram for MotorAssignment:
+ Collaboration diagram for MotorAssignment:

Signals

void activeChanged ()
 
void messageChanged ()
 
void onAbort ()
 

Public Member Functions

 MotorAssignment (QObject *parent, Vehicle *vehicle, QmlObjectListModel *actuators)
 
virtual ~MotorAssignment ()=default
 
bool initAssignment (int selectedActuatorIdx, int firstMotorsFunction, int numMotors)
 
void start ()
 
void selectMotor (int motorIndex)
 
void spinCurrentMotor ()
 
void abort ()
 
bool active () const
 
const QString & message () const
 

Detailed Description

Handles automatic motor ordering assignment by spinning individual motors, and then having the user to select the corresponding motor.

Definition at line 15 of file MotorAssignment.h.

Constructor & Destructor Documentation

◆ MotorAssignment()

MotorAssignment::MotorAssignment ( QObject *  parent,
Vehicle vehicle,
QmlObjectListModel actuators 
)

Definition at line 8 of file MotorAssignment.cc.

◆ ~MotorAssignment()

virtual MotorAssignment::~MotorAssignment ( )
virtualdefault

Member Function Documentation

◆ abort()

void MotorAssignment::abort ( )

Definition at line 165 of file MotorAssignment.cc.

Referenced by Actuators::abortMotorAssignment().

◆ active()

bool MotorAssignment::active ( ) const
inline

Definition at line 40 of file MotorAssignment.h.

Referenced by Actuators::motorAssignmentActive().

◆ activeChanged

void MotorAssignment::activeChanged ( )
signal

Referenced by Actuators::Actuators().

◆ initAssignment()

bool MotorAssignment::initAssignment ( int  selectedActuatorIdx,
int  firstMotorsFunction,
int  numMotors 
)

Initialize assignment, and set the UI confirmation message to be shown to the user.

Returns
true on success, false on failure (message will contain the error message)

Definition at line 16 of file MotorAssignment.cc.

References QmlObjectListModel::count(), QmlObjectListModel::get(), and messageChanged().

Referenced by Actuators::initMotorAssignment().

◆ message()

const QString & MotorAssignment::message ( ) const
inline

Definition at line 42 of file MotorAssignment.h.

Referenced by Actuators::motorAssignmentMessage().

◆ messageChanged

void MotorAssignment::messageChanged ( )
signal

◆ onAbort

void MotorAssignment::onAbort ( )
signal

Referenced by Actuators::Actuators().

◆ selectMotor()

void MotorAssignment::selectMotor ( int  motorIndex)

Definition at line 126 of file MotorAssignment.cc.

◆ spinCurrentMotor()

void MotorAssignment::spinCurrentMotor ( )

Definition at line 156 of file MotorAssignment.cc.

Referenced by Actuators::spinCurrentMotor().

◆ start()

void MotorAssignment::start ( )

Start the assignment, called after confirming.

Definition at line 94 of file MotorAssignment.cc.

Referenced by Actuators::startMotorAssignment().


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