Commit 2e552b3a authored by Don Gagne's avatar Don Gagne

Add Vehicle::versionNotSetValue

parent 2f149c59
......@@ -313,7 +313,7 @@ bool APMFirmwarePlugin::_handleStatusText(Vehicle* vehicle, mavlink_message_t* m
mavlink_statustext_t statusText;
mavlink_msg_statustext_decode(message, &statusText);
if (vehicle->firmwareMajorVersion() == -1 || statusText.severity < MAV_SEVERITY_NOTICE) {
if (vehicle->firmwareMajorVersion() == Vehicle::versionNotSetValue || statusText.severity < MAV_SEVERITY_NOTICE) {
messageText = _getMessageText(message);
qCDebug(APMFirmwarePluginLog) << messageText;
......
......@@ -121,9 +121,9 @@ Vehicle::Vehicle(LinkInterface* link,
, _messageSeq(0)
, _compID(0)
, _heardFrom(false)
, _firmwareMajorVersion(-1)
, _firmwareMinorVersion(-1)
, _firmwarePatchVersion(-1)
, _firmwareMajorVersion(versionNotSetValue)
, _firmwareMinorVersion(versionNotSetValue)
, _firmwarePatchVersion(versionNotSetValue)
, _rollFact (0, _rollFactName, FactMetaData::valueTypeDouble)
, _pitchFact (0, _pitchFactName, FactMetaData::valueTypeDouble)
, _headingFact (0, _headingFactName, FactMetaData::valueTypeDouble)
......@@ -291,9 +291,9 @@ Vehicle::Vehicle(QObject* parent)
, _messageSeq(0)
, _compID(0)
, _heardFrom(false)
, _firmwareMajorVersion(-1)
, _firmwareMinorVersion(-1)
, _firmwarePatchVersion(-1)
, _firmwareMajorVersion(versionNotSetValue)
, _firmwareMinorVersion(versionNotSetValue)
, _firmwarePatchVersion(versionNotSetValue)
, _rollFact (0, _rollFactName, FactMetaData::valueTypeDouble)
, _pitchFact (0, _pitchFactName, FactMetaData::valueTypeDouble)
, _headingFact (0, _headingFactName, FactMetaData::valueTypeDouble)
......
......@@ -524,6 +524,7 @@ public:
int firmwareMinorVersion(void) const { return _firmwareMinorVersion; }
int firmwarePatchVersion(void) const { return _firmwarePatchVersion; }
void setFirmwareVersion(int majorVersion, int minorVersion, int patchVersion);
static const int versionNotSetValue = -1;
public slots:
void setLatitude(double latitude);
......
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