Unverified Commit ac8a932f authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8027 from DonLakeFlyer/UnusedCode

Remove unused code
parents d6c3a1eb 683113a0
...@@ -142,39 +142,6 @@ int UAS::getUASID() const ...@@ -142,39 +142,6 @@ int UAS::getUASID() const
void UAS::receiveMessage(mavlink_message_t message) void UAS::receiveMessage(mavlink_message_t message)
{ {
if (!components.contains(message.compid))
{
QString componentName;
switch (message.compid)
{
case MAV_COMP_ID_ALL:
{
componentName = "ANONYMOUS";
break;
}
case MAV_COMP_ID_IMU:
{
componentName = "IMU #1";
break;
}
case MAV_COMP_ID_CAMERA:
{
componentName = "CAMERA";
break;
}
case MAV_COMP_ID_MISSIONPLANNER:
{
componentName = "MISSIONPLANNER";
break;
}
}
components.insert(message.compid, componentName);
}
// qDebug() << "UAS RECEIVED from" << message.sysid << "component" << message.compid << "msg id" << message.msgid << "seq no" << message.seq;
// Only accept messages from this system (condition 1) // Only accept messages from this system (condition 1)
// and only then if a) attitudeStamped is disabled OR b) attitudeStamped is enabled // and only then if a) attitudeStamped is disabled OR b) attitudeStamped is enabled
// and we already got one attitude packet // and we already got one attitude packet
...@@ -1466,14 +1433,6 @@ void UAS::stopHil() ...@@ -1466,14 +1433,6 @@ void UAS::stopHil()
} }
#endif #endif
/**
* @rerturn the map of the components
*/
QMap<int, QString> UAS::getComponents()
{
return components;
}
void UAS::sendMapRCToParam(QString param_id, float scale, float value0, quint8 param_rc_channel_index, float valueMin, float valueMax) void UAS::sendMapRCToParam(QString param_id, float scale, float value0, quint8 param_rc_channel_index, float valueMin, float valueMax)
{ {
if (!_vehicle) { if (!_vehicle) {
......
...@@ -52,8 +52,6 @@ public: ...@@ -52,8 +52,6 @@ public:
/** @brief Get the unique system id */ /** @brief Get the unique system id */
int getUASID() const; int getUASID() const;
/** @brief Get the components */
QMap<int, QString> getComponents();
/** @brief The time interval the robot is switched on */ /** @brief The time interval the robot is switched on */
quint64 getUptime() const; quint64 getUptime() const;
...@@ -118,10 +116,9 @@ public: ...@@ -118,10 +116,9 @@ public:
friend class FileManager; friend class FileManager;
#endif #endif
protected: //COMMENTS FOR TEST UNIT protected:
/// LINK ID AND STATUS /// LINK ID AND STATUS
int uasId; ///< Unique system ID int uasId; ///< Unique system ID
QMap<int, QString> components;///< IDs and names of all detected onboard components
QList<int> unknownPackets; ///< Packet IDs which are unknown and have been received QList<int> unknownPackets; ///< Packet IDs which are unknown and have been received
MAVLinkProtocol* mavlink; ///< Reference to the MAVLink instance MAVLinkProtocol* mavlink; ///< Reference to the MAVLink instance
......
...@@ -48,8 +48,6 @@ public: ...@@ -48,8 +48,6 @@ public:
virtual FileManager* getFileManager() = 0; virtual FileManager* getFileManager() = 0;
#endif #endif
virtual QMap<int, QString> getComponents() = 0;
enum StartCalibrationType { enum StartCalibrationType {
StartCalibrationRadio, StartCalibrationRadio,
StartCalibrationGyro, StartCalibrationGyro,
...@@ -110,21 +108,6 @@ public slots: ...@@ -110,21 +108,6 @@ public slots:
virtual void unsetRCToParameterMap() = 0; virtual void unsetRCToParameterMap() = 0;
signals: signals:
/**
* @brief Update the error count of a device
*
* The error count indicates how many errors occurred during the use of a device.
* Usually a random error from time to time is acceptable, e.g. through electromagnetic
* interferences on device lines like I2C and SPI. A constantly and rapidly increasing
* error count however can help to identify broken cables or misbehaving drivers.
*
* @param uasid System ID
* @param component Name of the component, e.g. "IMU"
* @param device Name of the device, e.g. "SPI0" or "I2C1"
* @param count Errors occurred since system startup
*/
void errCountChanged(int uasid, QString component, QString device, int count);
/** @brief The robot is connected **/ /** @brief The robot is connected **/
void connected(); void connected();
/** @brief The robot is disconnected **/ /** @brief The robot is disconnected **/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment