diff --git a/QGCCommon.pri b/QGCCommon.pri index 350cd8e..92b6af4 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -181,7 +181,6 @@ installer { # Setup our supported build flavors -message($$CONFIG) CONFIG(debug, debug|release) { message(Debug flavor) CONFIG += DebugBuild diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 4f370b5..1757cdc 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1030,17 +1030,7 @@ void Vehicle::_handleDistanceSensor(mavlink_message_t& message) { mavlink_distance_sensor_t distanceSensor; - mavlink_msg_distance_sensor_decode(&message, &distanceSensor);\ - - if (!_distanceSensorFactGroup.idSet()) { - _distanceSensorFactGroup.setIdSet(true); - _distanceSensorFactGroup.setId(distanceSensor.id); - } - - if (_distanceSensorFactGroup.id() != distanceSensor.id) { - // We can only handle a single sensor reporting - return; - } + mavlink_msg_distance_sensor_decode(&message, &distanceSensor); struct orientation2Fact_s { MAV_SENSOR_ORIENTATION orientation; @@ -4354,8 +4344,6 @@ VehicleDistanceSensorFactGroup::VehicleDistanceSensorFactGroup(QObject* parent) , _rotationYaw315Fact (0, _rotationYaw315FactName, FactMetaData::valueTypeDouble) , _rotationPitch90Fact (0, _rotationPitch90FactName, FactMetaData::valueTypeDouble) , _rotationPitch270Fact (0, _rotationPitch270FactName, FactMetaData::valueTypeDouble) - , _idSet (false) - , _id (0) { _addFact(&_rotationNoneFact, _rotationNoneFactName); _addFact(&_rotationYaw45Fact, _rotationYaw45FactName); diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index 023c576..9368bf8 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -76,11 +76,6 @@ public: Fact* rotationPitch90 (void) { return &_rotationPitch90Fact; } Fact* rotationPitch270 (void) { return &_rotationPitch270Fact; } - bool idSet(void) { return _idSet; } - void setIdSet(bool idSet) { _idSet = idSet; } - uint8_t id(void) { return _id; } - void setId(uint8_t id) { _id = id; } - static const char* _rotationNoneFactName; static const char* _rotationYaw45FactName; static const char* _rotationYaw90FactName; @@ -103,9 +98,6 @@ private: Fact _rotationYaw315Fact; Fact _rotationPitch90Fact; Fact _rotationPitch270Fact; - - bool _idSet; // true: _id is set to seen sensor id - uint8_t _id; // The id for the sensor being tracked. Current support for only a single sensor. }; class VehicleSetpointFactGroup : public FactGroup