Add the ability to enable and disable actors from the ui
add safe and timeout to the regulator actor
This commit is contained in:
parent
d8471789b7
commit
271330d5fd
7 changed files with 176 additions and 20 deletions
|
|
@ -24,12 +24,17 @@ RegulatorWdiget::RegulatorWdiget(std::shared_ptr<Regulator> regulator, SensorSto
|
|||
}
|
||||
ui->doubleSpinBox_setPoint->setValue(regulator->getSetPoint());
|
||||
ui->doubleSpinBox_band->setValue(regulator->getBand());
|
||||
ui->spinBox_safe->setValue(regulator_->getSafeValue());
|
||||
ui->spinBox_timeout->setValue(regulator_->getTimeout());
|
||||
|
||||
connect(ui->listView, &SensorListWidget::clicked, this, &RegulatorWdiget::setSensor);
|
||||
connect(ui->doubleSpinBox_setPoint, SIGNAL(valueChanged(double)), this, SLOT(setPoint(double)));
|
||||
connect(ui->doubleSpinBox_band, SIGNAL(valueChanged(double)), this, SLOT(setBand(double)));
|
||||
connect(ui->spinBox_safe, SIGNAL(valueChanged(int)), regulator_.get(), SLOT(setSafeValue(int)));
|
||||
connect(ui->spinBox_timeout, SIGNAL(valueChanged(int)), regulator_.get(), SLOT(setTimeout(int)));
|
||||
}
|
||||
|
||||
|
||||
void RegulatorWdiget::setPoint(double in)
|
||||
{
|
||||
regulator_->setPoint(in);
|
||||
|
|
|
|||
|
|
@ -38,15 +38,8 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Set Point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_setPoint">
|
||||
<property name="minimum">
|
||||
<double>-9999.989999999999782</double>
|
||||
|
|
@ -56,7 +49,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
|
|
@ -69,9 +62,46 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Timeout</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Set Point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_band"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Safety Value</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_safe"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="spinBox_timeout">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1800</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue