Browse Source

MAVLinkProtocol: Add missing const in member functions

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 4 years ago committed by Don Gagne
parent
commit
5b9d33374e
  1. 2
      src/comm/MAVLinkProtocol.cc
  2. 18
      src/comm/MAVLinkProtocol.h

2
src/comm/MAVLinkProtocol.cc

@ -383,7 +383,7 @@ QString MAVLinkProtocol::getName()
} }
/** @return System id of this application */ /** @return System id of this application */
int MAVLinkProtocol::getSystemId() int MAVLinkProtocol::getSystemId() const
{ {
return systemId; return systemId;
} }

18
src/comm/MAVLinkProtocol.h

@ -47,10 +47,10 @@ public:
/** @brief Get the human-friendly name of this protocol */ /** @brief Get the human-friendly name of this protocol */
QString getName(); QString getName();
/** @brief Get the system id of this application */ /** @brief Get the system id of this application */
int getSystemId(); int getSystemId() const;
/** @brief Get the component id of this application */ /** @brief Get the component id of this application */
int getComponentId(); int getComponentId();
/** @brief Get protocol version check state */ /** @brief Get protocol version check state */
bool versionCheckEnabled() const { bool versionCheckEnabled() const {
return m_enable_version_check; return m_enable_version_check;
@ -60,14 +60,14 @@ public:
return MAVLINK_VERSION; return MAVLINK_VERSION;
} }
/** @brief Get the currently configured protocol version */ /** @brief Get the currently configured protocol version */
unsigned getCurrentVersion() { unsigned getCurrentVersion() const{
return _current_version; return _current_version;
} }
/** /**
* Reset the counters for all metadata for this link. * Reset the counters for all metadata for this link.
*/ */
virtual void resetMetadataForLink(LinkInterface *link); virtual void resetMetadataForLink(LinkInterface *link);
/// Suspend/Restart logging during replay. /// Suspend/Restart logging during replay.
void suspendLogForReplay(bool suspend); void suspendLogForReplay(bool suspend);
@ -83,7 +83,7 @@ public slots:
/** @brief Log bytes sent from a communication interface */ /** @brief Log bytes sent from a communication interface */
void logSentBytes(LinkInterface* link, QByteArray b); void logSentBytes(LinkInterface* link, QByteArray b);
/** @brief Set the system id of this application */ /** @brief Set the system id of this application */
void setSystemId(int id); void setSystemId(int id);
@ -94,10 +94,10 @@ public slots:
void loadSettings(); void loadSettings();
/** @brief Store protocol settings */ /** @brief Store protocol settings */
void storeSettings(); void storeSettings();
/// @brief Deletes any log files which are in the temp directory /// @brief Deletes any log files which are in the temp directory
static void deleteTempLogFiles(void); static void deleteTempLogFiles(void);
/// Checks for lost log files /// Checks for lost log files
void checkForLostLogFiles(void); void checkForLostLogFiles(void);
@ -145,7 +145,7 @@ signals:
*/ */
void radioStatusChanged(LinkInterface* link, unsigned rxerrors, unsigned fixed, int rssi, int remrssi, void radioStatusChanged(LinkInterface* link, unsigned rxerrors, unsigned fixed, int rssi, int remrssi,
unsigned txbuf, unsigned noise, unsigned remnoise); unsigned txbuf, unsigned noise, unsigned remnoise);
/// Emitted when a temporary telemetry log file is ready for saving /// Emitted when a temporary telemetry log file is ready for saving
void saveTelemetryLog(QString tempLogfile); void saveTelemetryLog(QString tempLogfile);
@ -154,7 +154,7 @@ signals:
private slots: private slots:
void _vehicleCountChanged(void); void _vehicleCountChanged(void);
private: private:
bool _closeLogFile(void); bool _closeLogFile(void);
void _startLogging(void); void _startLogging(void);

Loading…
Cancel
Save