fix relays bugs
This commit is contained in:
parent
19eeb8246e
commit
46390dc9df
@ -45,7 +45,6 @@ SingleRelay::SingleRelay(int slot,int cardtype,QWidget *parent)
|
|||||||
btnGroup_slot->addButton(ui->pushButton_slot13);
|
btnGroup_slot->addButton(ui->pushButton_slot13);
|
||||||
btnGroup_slot->addButton(ui->pushButton_slot14);
|
btnGroup_slot->addButton(ui->pushButton_slot14);
|
||||||
btnGroup_slot->addButton(ui->pushButton_slot15);
|
btnGroup_slot->addButton(ui->pushButton_slot15);
|
||||||
btnGroup_slot->addButton(ui->pushButton_slot16);
|
|
||||||
|
|
||||||
connect(btnGroup_slot, SIGNAL(buttonClicked(QAbstractButton *)), this, SLOT(OnButtonGroup(QAbstractButton *)));
|
connect(btnGroup_slot, SIGNAL(buttonClicked(QAbstractButton *)), this, SLOT(OnButtonGroup(QAbstractButton *)));
|
||||||
connect(ui->comboBox_relay_ch, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(ui->comboBox_relay_ch, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
@ -112,6 +111,8 @@ void SingleRelay::Init(){
|
|||||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(cardbase_ptr);
|
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(cardbase_ptr);
|
||||||
for (int var = 0; var < CHANNEL_COUNT; ++var) {
|
for (int var = 0; var < CHANNEL_COUNT; ++var) {
|
||||||
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(var + 1);
|
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(var + 1);
|
||||||
|
if(variable_base == nullptr)
|
||||||
|
continue;
|
||||||
QString item_data,item_str;
|
QString item_data,item_str;
|
||||||
if(variable_base->alert_high.enable){
|
if(variable_base->alert_high.enable){
|
||||||
item_str = QString("%1 (槽位 %2 通道 %3 警报高)").arg(ptr->base_config_[var].point_name).arg(ptr->base_config_[var].chan_id.mid(1,2)).arg(ptr->base_config_[var].chan_id.mid(4,2));
|
item_str = QString("%1 (槽位 %2 通道 %3 警报高)").arg(ptr->base_config_[var].point_name).arg(ptr->base_config_[var].chan_id.mid(1,2)).arg(ptr->base_config_[var].chan_id.mid(4,2));
|
||||||
|
@ -524,28 +524,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_20">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>16</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -837,25 +815,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_slot16">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>220</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>220</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user