Companion enhanced telemetry sensors context menu and other refinements across context menus (#7716)

Companion enhanced telemetry sensors context menu with reference updates
This commit is contained in:
Neil Horne
2020-09-04 18:36:58 +02:00
committed by GitHub
parent f7153ababb
commit 5a500cc055
22 changed files with 381 additions and 139 deletions
+6 -1
View File
@@ -104,7 +104,7 @@ QString SensorData::getOrigin(const ModelData * model) const
{
if (type != TELEM_TYPE_CUSTOM || !id)
return QString();
const ModuleData & module = model->moduleData[moduleIdx];
if (module.isPxx2Module() && rxIdx <= 2 && module.access.receivers & (1 << rxIdx)) {
return QString(module.access.receiverName[rxIdx]);
@@ -113,3 +113,8 @@ QString SensorData::getOrigin(const ModelData * model) const
return QString();
}
}
bool SensorData::isEmpty() const
{
return (!isAvailable() && type == 0 && id == 0 && subid == 0 && instance == 0 && rxIdx == 0 && moduleIdx == 0 && unit == 0 && ratio == 0 && prec == 0 && offset == 0 && autoOffset == 0 && filter == 0 && onlyPositive == 0 && logs == 0);
}