modify bug

This commit is contained in:
SHENG-PC\admin 2025-11-21 21:48:04 +08:00
parent dbed030a0c
commit 108ac397b6
3 changed files with 9 additions and 5 deletions

View File

@ -1181,12 +1181,12 @@
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
</item> </item>
</widget> </widget>

View File

@ -210,14 +210,16 @@ void Seismic_monitor::on_pushButton_confirm_clicked() {
QMessageBox::information(this, QStringLiteral("提示"), "传感器灵敏度填写错误!"); QMessageBox::information(this, QStringLiteral("提示"), "传感器灵敏度填写错误!");
return; return;
} }
for (int var = 0; var < SLOT_NUM; var ++) { for (int var = 1; var <= SLOT_NUM; var ++) {
if(ui->comboBox_relative_number->currentIndex() != 0){ if(ui->comboBox_relative_number->currentIndex() != 0){
std::shared_ptr<CardBase> slot_base_ptr = ConfigMgr::Instance()->GetSlotPtr(var); std::shared_ptr<CardBase> slot_base_ptr = ConfigMgr::Instance()->GetSlotPtr(var);
if(slot_base_ptr == nullptr || slot_base_ptr->card_type_ != kCardVibSingle) if(slot_base_ptr == nullptr || slot_base_ptr->card_type_ != kCardVibSingle)
continue; continue;
if(var == slot_no)
continue;
qDebug() << "relative_number" << var << slot_base_ptr->relative_number; qDebug() << "relative_number" << var << slot_base_ptr->relative_number;
if(slot_base_ptr->relative_number == ui->comboBox_relative_number->currentIndex() && if(slot_base_ptr->relative_number == ui->comboBox_relative_number->currentIndex() &&
slot_base_ptr->card_type_ != kCardSpeedSingle){ slot_base_ptr->card_type_ != kCardSpeedSingle ){
QMessageBox::information(this, QStringLiteral("提示"), "板卡相对编号重复!"); QMessageBox::information(this, QStringLiteral("提示"), "板卡相对编号重复!");
return; return;
} }

View File

@ -438,11 +438,13 @@ void Tachometer::on_pushButton_confirm_clicked() {
qCritical() << " should not be here"; qCritical() << " should not be here";
return; return;
} }
for (int var = 0; var < SLOT_NUM; var ++) { for (int var = 1; var < SLOT_NUM; var ++) {
if(ui->comboBox_relative_number->currentIndex() != 0){ if(ui->comboBox_relative_number->currentIndex() != 0){
std::shared_ptr<CardBase> slot_base_ptr = ConfigMgr::Instance()->GetSlotPtr(var); std::shared_ptr<CardBase> slot_base_ptr = ConfigMgr::Instance()->GetSlotPtr(var);
if(slot_base_ptr == nullptr || slot_base_ptr->card_type_ != kCardSpeedSingle) if(slot_base_ptr == nullptr || slot_base_ptr->card_type_ != kCardSpeedSingle)
continue; continue;
if(var == slot_no)
continue;
qDebug() << "relative_number" << var << slot_base_ptr->relative_number; qDebug() << "relative_number" << var << slot_base_ptr->relative_number;
if(slot_base_ptr->relative_number == ui->comboBox_relative_number->currentIndex() && if(slot_base_ptr->relative_number == ui->comboBox_relative_number->currentIndex() &&
slot_base_ptr->card_type_ != kCardVibSingle){ slot_base_ptr->card_type_ != kCardVibSingle){