Commit b4960fab authored by DonLakeFlyer's avatar DonLakeFlyer

Fix id screwup causing vehicle creation to break

parent e15f496a
......@@ -797,10 +797,10 @@ void Vehicle::_handleDistanceSensor(mavlink_message_t& message)
if (!_distanceSensorFactGroup.idSet()) {
_distanceSensorFactGroup.setIdSet(true);
_id = distanceSensor.id;
_distanceSensorFactGroup.setId(distanceSensor.id);
}
if (_id != distanceSensor.id) {
if (_distanceSensorFactGroup.id() != distanceSensor.id) {
// We can only handle a single sensor reporting
return;
}
......
......@@ -71,6 +71,8 @@ public:
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;
......
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