Commit 6267f16b authored by Don Gagne's avatar Don Gagne

Default decimal places for PID params

parent b25cde07
...@@ -568,6 +568,15 @@ void APMParameterMetaData::addMetaDataToFact(Fact* fact, MAV_TYPE vehicleType) ...@@ -568,6 +568,15 @@ void APMParameterMetaData::addMetaDataToFact(Fact* fact, MAV_TYPE vehicleType)
} }
} }
// ArduPilot does not yet support decimal places meta data. So for P/I/D parameters we force to 6 places
if ((fact->name().endsWith(QStringLiteral("_P")) ||
fact->name().endsWith(QStringLiteral("_I")) ||
fact->name().endsWith(QStringLiteral("_D"))) &&
(fact->type() == FactMetaData::valueTypeFloat ||
fact->type() == FactMetaData::valueTypeDouble)) {
metaData->setDecimalPlaces(6);
}
fact->setMetaData(metaData); fact->setMetaData(metaData);
} }
......
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