added receiver display to sensors
This commit is contained in:
@@ -653,6 +653,9 @@ void TelemetrySensorPanel::update()
|
||||
ui->id->hide();
|
||||
ui->instanceLabel->hide();
|
||||
ui->instance->hide();
|
||||
ui->rxLabel->hide();
|
||||
ui->moduleLabel->hide();
|
||||
ui->rxOrMod->hide();
|
||||
ui->formula->show();
|
||||
ui->formula->setCurrentIndex(sensor.formula);
|
||||
isConfigurable = (sensor.formula < SensorData::TELEM_FORMULA_CELL);
|
||||
@@ -676,6 +679,29 @@ void TelemetrySensorPanel::update()
|
||||
ui->id->show();
|
||||
ui->instanceLabel->show();
|
||||
ui->instance->show();
|
||||
|
||||
const ModuleData& module = model->moduleData[sensor.moduleIdx];
|
||||
if (module.isPxx2Module()) {
|
||||
ui->rxLabel->show();
|
||||
ui->moduleLabel->hide();
|
||||
if (module.access.receivers & (1 << sensor.rxIdx)) {
|
||||
ui->rxOrMod->setText(module.access.receiverName[sensor.rxIdx]);
|
||||
}
|
||||
else {
|
||||
// receiver does not seem to be active
|
||||
ui->rxOrMod->clear();
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui->rxLabel->hide();
|
||||
ui->moduleLabel->show();
|
||||
if (sensor.moduleIdx)
|
||||
ui->rxOrMod->setText(tr("Internal Module"));
|
||||
else
|
||||
ui->rxOrMod->setText(tr("External Module"));
|
||||
}
|
||||
ui->rxOrMod->show();
|
||||
|
||||
ui->formula->hide();
|
||||
isConfigurable = sensor.unit < SensorData::UNIT_FIRST_VIRTUAL;
|
||||
ratioFieldsDisplayed = (sensor.unit < SensorData::UNIT_FIRST_VIRTUAL);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1,0,0,0,1,1,1,1,0,0,1,0,1,0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1,0,0,0,1,0,0,0,1,1,1,0,0,1,0,1,0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -28,6 +28,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
</property>
|
||||
@@ -114,6 +120,48 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rxLabel">
|
||||
<property name="text">
|
||||
<string>Rx</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="moduleLabel">
|
||||
<property name="text">
|
||||
<string>Mod.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="rxOrMod">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="formula">
|
||||
<property name="sizePolicy">
|
||||
|
||||
Reference in New Issue
Block a user