add filter verify,fix close config bugs
This commit is contained in:
parent
24f3956206
commit
3bcd3c9c9b
@ -139,6 +139,18 @@ void Acceleration::on_pushButton_confirm_clicked() {
|
|||||||
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ui->spinBox_high_pass_low->value() > ui->spinBox_high_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通1配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_low_pass_low->value() > ui->spinBox_low_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通2配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_band_pass_low->value() > ui->spinBox_band_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通3配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||||
ptr->base_config_[channel - 1].channel_type = kVibAcc;
|
ptr->base_config_[channel - 1].channel_type = kVibAcc;
|
||||||
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(channel);
|
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(channel);
|
||||||
|
|||||||
@ -236,6 +236,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -259,6 +262,15 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@ -116,7 +116,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
//qInstallMessageHandler(messageHandler);
|
//qInstallMessageHandler(messageHandler);
|
||||||
#endif
|
#endif
|
||||||
QDate buildDate = QLocale( QLocale::English ).toDate( QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
|
QDate buildDate = QLocale( QLocale::English ).toDate( QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
|
||||||
QString Version = "V1.0_" + buildDate.toString("yyyyMMdd") + "_8417";
|
QString Version = "V1.0_" + buildDate.toString("yyyyMMdd") + "_24f3";
|
||||||
ui->label_version->setText(Version);
|
ui->label_version->setText(Version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,6 +216,8 @@ void MainWindow::createMenu(const QString &rootTitle, QPushButton *parent) {
|
|||||||
mainMenu->addSeparator();
|
mainMenu->addSeparator();
|
||||||
QAction *version = mainMenu->addAction("查看版本");
|
QAction *version = mainMenu->addAction("查看版本");
|
||||||
mainMenu->addSeparator();
|
mainMenu->addSeparator();
|
||||||
|
QAction *copy_sub_card = mainMenu->addAction("复制板卡配置");
|
||||||
|
QAction *move_sub_card = mainMenu->addAction("移动板卡配置");
|
||||||
QAction *config_sub_card = mainMenu->addAction("更新配置");
|
QAction *config_sub_card = mainMenu->addAction("更新配置");
|
||||||
QAction *get_sub_log = mainMenu->addAction("获取日志");
|
QAction *get_sub_log = mainMenu->addAction("获取日志");
|
||||||
QAction *get_sub_card_voltage = mainMenu->addAction("获取电压范围");
|
QAction *get_sub_card_voltage = mainMenu->addAction("获取电压范围");
|
||||||
@ -249,6 +251,8 @@ void MainWindow::createMenu(const QString &rootTitle, QPushButton *parent) {
|
|||||||
QObject::connect(get_sub_card_voltage, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
QObject::connect(get_sub_card_voltage, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
||||||
QObject::connect(get_vib_version, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
QObject::connect(get_vib_version, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
||||||
QObject::connect(get_card_processID, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
QObject::connect(get_card_processID, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
||||||
|
QObject::connect(copy_sub_card, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
||||||
|
QObject::connect(move_sub_card, &QAction::triggered, this, &MainWindow::onMenuActionTriggered);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,6 +437,10 @@ void MainWindow::onMenuActionTriggered() {
|
|||||||
GetVibVersion(button_id);
|
GetVibVersion(button_id);
|
||||||
}else if(action->text() == "获取进程号"){
|
}else if(action->text() == "获取进程号"){
|
||||||
GetCardProcessID(button_id);
|
GetCardProcessID(button_id);
|
||||||
|
}else if(action->text() == "复制板卡配置"){
|
||||||
|
GetCardProcessID(button_id);
|
||||||
|
}else if(action->text() == "移动板卡配置"){
|
||||||
|
GetCardProcessID(button_id);
|
||||||
}
|
}
|
||||||
break; // 找到按钮后,跳出循环
|
break; // 找到按钮后,跳出循环
|
||||||
}
|
}
|
||||||
@ -698,6 +706,7 @@ void MainWindow::on_pushButton_open_clicked() {
|
|||||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
||||||
if(base_ptr != nullptr){
|
if(base_ptr != nullptr){
|
||||||
ConfigMgr::Instance()->RemoveCard(base_ptr);
|
ConfigMgr::Instance()->RemoveCard(base_ptr);
|
||||||
|
ConfigMgr::Instance()->card_type_[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConfigMgr::Instance()->Load(tsi_config_file);
|
ConfigMgr::Instance()->Load(tsi_config_file);
|
||||||
@ -902,6 +911,40 @@ void MainWindow::GetCardProcessID(int slot){
|
|||||||
qint64 bytesWritten = m_tcpClient->sendData((char*)&get_card_processID_req, length);
|
qint64 bytesWritten = m_tcpClient->sendData((char*)&get_card_processID_req, length);
|
||||||
m_tcpClient->waitForRead();
|
m_tcpClient->waitForRead();
|
||||||
qDebug() << "bytesWritten: " << bytesWritten;
|
qDebug() << "bytesWritten: " << bytesWritten;
|
||||||
|
}
|
||||||
|
void MainWindow::CopySubCard(int slot){
|
||||||
|
slot_no = slot;
|
||||||
|
QString strTips = QString("请输入1到15之间的数值");
|
||||||
|
bool ok = false;
|
||||||
|
int value = QInputDialog::getInt(this, tr("输入整数对话框"), strTips, 0, 1, 15, 1, &ok);
|
||||||
|
if(!ok) return;
|
||||||
|
if(value < 1){
|
||||||
|
QMessageBox::information(this, QStringLiteral("提示"), QStringLiteral("请输入正确的板卡号!"));
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
int card_type_old = -1, card_type_new = -1;
|
||||||
|
std::shared_ptr<CardBase> base_ptr_old = ConfigMgr::Instance()->GetSlotPtr(slot_no);
|
||||||
|
if(base_ptr_old != nullptr){
|
||||||
|
card_type_old = base_ptr_old->card_type_;
|
||||||
|
}
|
||||||
|
std::shared_ptr<CardBase> base_ptr_new = ConfigMgr::Instance()->GetSlotPtr(value);
|
||||||
|
if(base_ptr_new != nullptr){
|
||||||
|
card_type_new = base_ptr_new->card_type_;
|
||||||
|
if(card_type_old != card_type_new){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), QStringLiteral("请选择相同的板卡类型!"));
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), QStringLiteral("目标板卡无配置,请使用“移动板卡配置”!"));
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
std::shared_ptr<VibrationData> vib_data = std::make_shared<VibrationData>();
|
||||||
|
vib_data->slot_ = value;
|
||||||
|
vib_data->relative_number = value;
|
||||||
|
ConfigMgr::Instance()->AddCard(vib_data);
|
||||||
|
}
|
||||||
|
void MainWindow::MoveSubCard(int slot){
|
||||||
|
|
||||||
}
|
}
|
||||||
void MainWindow::readData(const QByteArray &data) {
|
void MainWindow::readData(const QByteArray &data) {
|
||||||
qDebug() << "Received from server:" << data;
|
qDebug() << "Received from server:" << data;
|
||||||
@ -1086,7 +1129,9 @@ void MainWindow::onCloseConfig(){
|
|||||||
for (int i = 0; i < SLOT_NUM; i++) {
|
for (int i = 0; i < SLOT_NUM; i++) {
|
||||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
||||||
if(base_ptr != nullptr){
|
if(base_ptr != nullptr){
|
||||||
|
qDebug() << "i" << i << base_ptr->card_type_;
|
||||||
ConfigMgr::Instance()->RemoveCard(base_ptr);
|
ConfigMgr::Instance()->RemoveCard(base_ptr);
|
||||||
|
ConfigMgr::Instance()->card_type_[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tsi_config_file = "";
|
tsi_config_file = "";
|
||||||
@ -1188,3 +1233,9 @@ void MainWindow::on_pushButton_upload_config_clicked(){
|
|||||||
UploadConfigFile(0x1);
|
UploadConfigFile(0x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_close_clicked()
|
||||||
|
{
|
||||||
|
onCloseConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,8 @@ private:
|
|||||||
void GetVoltageRangeValue(int slot);
|
void GetVoltageRangeValue(int slot);
|
||||||
void GetVibVersion(int slot);
|
void GetVibVersion(int slot);
|
||||||
void GetCardProcessID(int slot);
|
void GetCardProcessID(int slot);
|
||||||
|
void CopySubCard(int slot);
|
||||||
|
void MoveSubCard(int slot);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
@ -95,5 +96,6 @@ private slots:
|
|||||||
void on_pushButton_download_clicked();
|
void on_pushButton_download_clicked();
|
||||||
void on_pushButton_upload_clicked();
|
void on_pushButton_upload_clicked();
|
||||||
void on_pushButton_upload_config_clicked();
|
void on_pushButton_upload_config_clicked();
|
||||||
|
void on_pushButton_close_clicked();
|
||||||
};
|
};
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
<widget class="QPushButton" name="pushButton_upload">
|
<widget class="QPushButton" name="pushButton_upload">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>140</x>
|
<x>200</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>45</width>
|
<width>45</width>
|
||||||
<height>45</height>
|
<height>45</height>
|
||||||
@ -119,7 +119,7 @@
|
|||||||
<widget class="QPushButton" name="pushButton_download">
|
<widget class="QPushButton" name="pushButton_download">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>260</x>
|
<x>320</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>45</width>
|
<width>45</width>
|
||||||
<height>45</height>
|
<height>45</height>
|
||||||
@ -147,7 +147,7 @@
|
|||||||
<widget class="QPushButton" name="pushButton_upload_config">
|
<widget class="QPushButton" name="pushButton_upload_config">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>200</x>
|
<x>260</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>45</width>
|
<width>45</width>
|
||||||
<height>45</height>
|
<height>45</height>
|
||||||
@ -172,6 +172,34 @@
|
|||||||
<string>配置</string>
|
<string>配置</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_close">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>140</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>45</width>
|
||||||
|
<height>45</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>45</width>
|
||||||
|
<height>45</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>45</width>
|
||||||
|
<height>45</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>打开配置文件</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>关闭</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@ -139,6 +139,18 @@ void PressurePulsation::on_pushButton_confirm_clicked()
|
|||||||
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ui->spinBox_high_pass_low->value() > ui->spinBox_high_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通1配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_low_pass_low->value() > ui->spinBox_low_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通2配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_band_pass_low->value() > ui->spinBox_band_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通3配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||||
ptr->base_config_[channel - 1].channel_type = kVibPressurePulsation;
|
ptr->base_config_[channel - 1].channel_type = kVibPressurePulsation;
|
||||||
|
|
||||||
|
|||||||
@ -227,6 +227,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -250,6 +253,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@ -149,6 +149,18 @@ void Radial::on_pushButton_confirm_clicked() {
|
|||||||
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ui->spinBox_high_pass_low->value() > ui->spinBox_high_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通1配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_low_pass_low->value() > ui->spinBox_low_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通2配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_band_pass_low->value() > ui->spinBox_band_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通3配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||||
ptr->base_config_[channel - 1].channel_type = kVibRadial;
|
ptr->base_config_[channel - 1].channel_type = kVibRadial;
|
||||||
|
|
||||||
@ -319,3 +331,9 @@ void Radial::on_lineEdit_alert_high_level_editingFinished()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Radial::on_comboBox_rectifier_funtion_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,8 @@ class Radial : public QWidget {
|
|||||||
void on_checkBox_2x_ampl_toggled(bool checked);
|
void on_checkBox_2x_ampl_toggled(bool checked);
|
||||||
void on_lineEdit_alert_high_level_editingFinished();
|
void on_lineEdit_alert_high_level_editingFinished();
|
||||||
|
|
||||||
|
void on_comboBox_rectifier_funtion_currentIndexChanged(int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Radial_vibration *ui;
|
Ui::Radial_vibration *ui;
|
||||||
|
|
||||||
|
|||||||
@ -221,6 +221,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -244,6 +247,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
12
trust.cpp
12
trust.cpp
@ -116,6 +116,18 @@ void Trust::on_pushButton_confirm_clicked()
|
|||||||
QMessageBox::warning(this, QStringLiteral("警告"), "警报 + 低 必须大于 危险 + 低");
|
QMessageBox::warning(this, QStringLiteral("警告"), "警报 + 低 必须大于 危险 + 低");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ui->spinBox_high_pass_low->value() > ui->spinBox_high_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通1配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_low_pass_low->value() > ui->spinBox_low_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通2配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_band_pass_low->value() > ui->spinBox_band_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通3配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||||
ptr->base_config_[channel - 1].channel_type = kVibThrust;
|
ptr->base_config_[channel - 1].channel_type = kVibThrust;
|
||||||
|
|
||||||
|
|||||||
14
trust.ui
14
trust.ui
@ -98,7 +98,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_5">
|
<widget class="QWidget" name="tab_5">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -221,6 +221,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -244,6 +250,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
12
velocity.cpp
12
velocity.cpp
@ -110,6 +110,18 @@ void Velocity::on_pushButton_confirm_clicked() {
|
|||||||
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
QMessageBox::warning(this, QStringLiteral("警告"), "危险 + 高 必须大于 警报 + 高");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(ui->spinBox_high_pass_low->value() > ui->spinBox_high_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通1配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_low_pass_low->value() > ui->spinBox_low_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通2配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(ui->spinBox_band_pass_low->value() > ui->spinBox_band_pass_high->value()){
|
||||||
|
QMessageBox::warning(this, QStringLiteral("警告"), "带通3配置错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||||
ptr->base_config_[channel - 1].channel_type = kVibVelocity;
|
ptr->base_config_[channel - 1].channel_type = kVibVelocity;
|
||||||
|
|
||||||
|
|||||||
12
velocity.ui
12
velocity.ui
@ -227,6 +227,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -250,6 +256,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3000</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user