Compare commits
No commits in common. "0df5b3bf5168abee3d576e9e991476b38ac7012a" and "6b8fa0685e4498904aac3add51d3e62b35353bdd" have entirely different histories.
0df5b3bf51
...
6b8fa0685e
@ -34,7 +34,6 @@ SOURCES += \
|
||||
tachometer_data.cpp \
|
||||
tmrrelayassociation.cpp \
|
||||
tmrrelayassociation_data.cpp \
|
||||
trust.cpp \
|
||||
velocity.cpp \
|
||||
vibrationdata.cpp
|
||||
|
||||
@ -66,8 +65,6 @@ HEADERS += \
|
||||
tachometer_data.h \
|
||||
tmrrelayassociation.h \
|
||||
tmrrelayassociation_data.h \
|
||||
trust.h \
|
||||
trust_ds.h \
|
||||
velocity.h \
|
||||
velocity_ds.h \
|
||||
vibrationdata.h
|
||||
@ -88,7 +85,6 @@ FORMS += \
|
||||
singlerelay.ui \
|
||||
tachometer.ui \
|
||||
tmrrelayassociation.ui \
|
||||
trust.ui \
|
||||
velocity.ui
|
||||
|
||||
# Default rules for deployment.
|
||||
|
@ -49,11 +49,5 @@ class AccVelVariable : public VariableBase {
|
||||
bool rms_active_;
|
||||
bool integrate_active_;
|
||||
};
|
||||
// 加速度与速度
|
||||
class ThrustVariable : public VariableBase {
|
||||
public:
|
||||
bool alert_latching_;
|
||||
bool danger_latching_;
|
||||
bool timed_ok_;
|
||||
};
|
||||
|
||||
#endif // CARDBASE_H
|
||||
|
@ -66,24 +66,19 @@ void ConfigMgr::Save(QString & file_path) {
|
||||
channel_item["power"] = ptr->base_config_[cid].power;
|
||||
channel_item["point_name"] = ptr->base_config_[cid].point_name;
|
||||
channel_item["chan_id"] = ptr->base_config_[cid].chan_id;
|
||||
channel_item["keyphase"] = ptr->base_config_[cid].keyphase;
|
||||
channel_item["keyphase_slot"] = ptr->base_config_[cid].keyphase_slot;
|
||||
channel_item["keyphase_ch"] = ptr->base_config_[cid].keyphase_ch;
|
||||
QJsonArray voltage_range;
|
||||
voltage_range.append(ptr->base_config_[cid].normal_voltage_low);
|
||||
voltage_range.append(ptr->base_config_[cid].normal_voltage_high);
|
||||
channel_item["normal_voltage_range"] = voltage_range;
|
||||
QJsonObject setpoint_data;
|
||||
if(ptr->base_config_[cid].channel_type != kVibThrust){
|
||||
setpoint_data["1x_ampl_upper"] = qRound(ptr->alert_danger[cid].x1_ampl_upper * 10)/10.0;
|
||||
setpoint_data["1x_ampl_lower"] = qRound(ptr->alert_danger[cid].x1_ampl_lower * 10)/10.0;
|
||||
setpoint_data["1x_ampl_enable"] = ptr->alert_danger[cid].x1_ampl_enable;
|
||||
setpoint_data["2x_ampl_upper"] = qRound(ptr->alert_danger[cid].x2_ampl_upper * 10)/10.0;
|
||||
setpoint_data["2x_ampl_lower"] = qRound(ptr->alert_danger[cid].x2_ampl_lower * 10)/10.0;
|
||||
setpoint_data["2x_ampl_enable"] = ptr->alert_danger[cid].x2_ampl_enable;
|
||||
}
|
||||
setpoint_data["direct_upper"] = qRound(ptr->alert_danger[cid].direct_upper * 10)/10.0;
|
||||
setpoint_data["direct_enable"] = ptr->alert_danger[cid].direct_enable;
|
||||
setpoint_data["1x_ampl_upper"] = qRound(ptr->alert_danger[cid].x1_ampl_upper * 10)/10.0;
|
||||
setpoint_data["1x_ampl_lower"] = qRound(ptr->alert_danger[cid].x1_ampl_lower * 10)/10.0;
|
||||
setpoint_data["1x_ampl_enable"] = ptr->alert_danger[cid].x1_ampl_enable;
|
||||
setpoint_data["2x_ampl_upper"] = qRound(ptr->alert_danger[cid].x2_ampl_upper * 10)/10.0;
|
||||
setpoint_data["2x_ampl_lower"] = qRound(ptr->alert_danger[cid].x2_ampl_lower * 10)/10.0;
|
||||
setpoint_data["2x_ampl_enable"] = ptr->alert_danger[cid].x2_ampl_enable;
|
||||
setpoint_data["danger_param"] = ptr->alert_danger[cid].danger_param;
|
||||
setpoint_data["danger_upper"] = qRound(ptr->alert_danger[cid].danger_upper * 10)/10.0;
|
||||
setpoint_data["danger_enable"] = ptr->alert_danger[cid].danger_enable;
|
||||
@ -152,51 +147,6 @@ void ConfigMgr::Save(QString & file_path) {
|
||||
latching.append(radial_ptr->alert_latching_);
|
||||
latching.append(radial_ptr->danger_latching_);
|
||||
variables["latching"] = latching;
|
||||
}else if(ptr->base_config_[cid].channel_type == kVibThrust){
|
||||
std::shared_ptr<ThrustVariable> thrust_ptr = std::dynamic_pointer_cast<ThrustVariable>(base_channel_ptr);
|
||||
if(thrust_ptr == nullptr){
|
||||
continue;
|
||||
}
|
||||
// filter
|
||||
QJsonArray filter;
|
||||
QJsonObject low_pass;
|
||||
low_pass["low"] = thrust_ptr->filter_[0].low;
|
||||
low_pass["high"] = thrust_ptr->filter_[0].high;
|
||||
low_pass["checked"] = thrust_ptr->filter_[0].checked;
|
||||
filter.append(low_pass);
|
||||
QJsonObject high_pass;
|
||||
high_pass["low"] = thrust_ptr->filter_[1].low;
|
||||
high_pass["high"] = thrust_ptr->filter_[1].high;
|
||||
high_pass["checked"] = thrust_ptr->filter_[1].checked;
|
||||
filter.append(high_pass);
|
||||
QJsonObject band_pass;
|
||||
band_pass["low"] = thrust_ptr->filter_[2].low;
|
||||
band_pass["high"] = thrust_ptr->filter_[2].high;
|
||||
band_pass["checked"] = thrust_ptr->filter_[2].checked;
|
||||
filter.append(band_pass);
|
||||
variables["filter"] = filter;
|
||||
QJsonObject direct;
|
||||
QJsonObject recorder_out;
|
||||
QJsonObject delay;
|
||||
QJsonArray latching;
|
||||
direct["full_scale_range"] = thrust_ptr->direct_.full_scale_range;
|
||||
direct["clamp_value"] = thrust_ptr->direct_.clamp_value;
|
||||
direct["custom"] = thrust_ptr->direct_.custom;
|
||||
variables["direct"] = direct;
|
||||
recorder_out["recorder_output"] = thrust_ptr->recorder_out_.recorder_output;
|
||||
recorder_out["two_ma_clamp"] = thrust_ptr->recorder_out_.two_ma_clamp;
|
||||
recorder_out["trip_multiply"] = thrust_ptr->recorder_out_.trip_multiply;
|
||||
recorder_out["comparision"] = thrust_ptr->recorder_out_.comparision;
|
||||
recorder_out["percentage"] = thrust_ptr->recorder_out_.percentage;
|
||||
variables["recorder_out"] = recorder_out;
|
||||
delay["alert"] = thrust_ptr->delay_.alert;
|
||||
delay["danger"] = thrust_ptr->delay_.danger;
|
||||
delay["active_100ms"] = thrust_ptr->delay_.active_100ms;
|
||||
variables["delay"] = delay;
|
||||
latching.append(thrust_ptr->alert_latching_);
|
||||
latching.append(thrust_ptr->danger_latching_);
|
||||
latching.append(thrust_ptr->timed_ok_);
|
||||
variables["latching"] = latching;
|
||||
} else {
|
||||
std::shared_ptr<AccVelVariable> av_ptr = std::dynamic_pointer_cast<AccVelVariable>(base_channel_ptr);
|
||||
if(av_ptr == nullptr){
|
||||
@ -430,9 +380,6 @@ void ConfigMgr::Load(QString filename) {
|
||||
vib_data->base_config_[j].power = channel["power"].toBool();
|
||||
vib_data->base_config_[j].point_name = channel["point_name"].toString();
|
||||
vib_data->base_config_[j].chan_id = channel["chan_id"].toString();
|
||||
vib_data->base_config_[j].keyphase = channel["keyphase"].toBool();
|
||||
vib_data->base_config_[j].keyphase_slot = channel["keyphase_slot"].toInt();
|
||||
vib_data->base_config_[j].keyphase_ch = channel["keyphase_ch"].toInt();
|
||||
//setpoint
|
||||
QJsonObject setpoint_data = channel["setpoint"].toObject();
|
||||
vib_data->alert_danger[j].direct_upper = setpoint_data["direct_upper"].toDouble();
|
||||
@ -492,36 +439,6 @@ void ConfigMgr::Load(QString filename) {
|
||||
vib_data->variables_.push_back(variable);
|
||||
break;
|
||||
}
|
||||
case kVibThrust: {
|
||||
std::shared_ptr<ThrustVariable> variable = std::make_shared<ThrustVariable>();
|
||||
// filter
|
||||
QJsonArray filter_array = tmp_variable["filter"].toArray();
|
||||
for (int k = 0; k < filter_array.size(); k++) {
|
||||
QJsonObject filter_ele = filter_array[k].toObject();
|
||||
variable->filter_[k].low = filter_ele["low"].toInt();
|
||||
variable->filter_[k].high = filter_ele["high"].toInt();
|
||||
variable->filter_[k].checked = filter_ele["checked"].toBool();
|
||||
}
|
||||
variable->id_ = j + 1;
|
||||
QJsonObject direct = tmp_variable["direct"].toObject();
|
||||
variable->direct_.full_scale_range = direct["full_scale_range"].toInt();
|
||||
variable->direct_.clamp_value = direct["clamp_value"].toDouble();
|
||||
variable->direct_.custom = direct["custom"].toDouble();
|
||||
|
||||
QJsonObject recorder_out = tmp_variable["recorder_out"].toObject();
|
||||
variable->recorder_out_.recorder_output = recorder_out["recorder_output"].toInt();
|
||||
variable->recorder_out_.two_ma_clamp = recorder_out["two_ma_clamp"].toBool();
|
||||
QJsonObject delay = tmp_variable["delay"].toObject();
|
||||
variable->delay_.alert = delay["alert"].toInt();
|
||||
variable->delay_.danger = delay["danger"].toDouble();
|
||||
variable->delay_.active_100ms = delay["active_100ms"].toBool();
|
||||
QJsonObject latching = tmp_variable["latching"].toObject();
|
||||
variable->alert_latching_ = latching["alert"].toBool();
|
||||
variable->danger_latching_ = latching["danger"].toBool();
|
||||
variable->timed_ok_ = latching["timed_ok"].toBool();
|
||||
vib_data->variables_.push_back(variable);
|
||||
break;
|
||||
}
|
||||
case kVibVelocity:
|
||||
case kVibAcc: {
|
||||
std::shared_ptr<AccVelVariable> variable = std::make_shared<AccVelVariable>();
|
||||
|
@ -42,9 +42,7 @@ typedef enum {
|
||||
typedef enum {
|
||||
kVibRadial = 0, // 径向位移
|
||||
kVibAcc = 1, // 加速度
|
||||
kVibVelocity = 2, // 速度
|
||||
kVibThrust = 3, //轴向位移
|
||||
kVibPressurePulsation = 4 //动态压力脉动
|
||||
kVibVelocity = 2 // 速度
|
||||
} VibChannelType;
|
||||
|
||||
typedef struct SlotConfig_{
|
||||
@ -124,9 +122,6 @@ typedef struct {
|
||||
float normal_voltage_low;
|
||||
float normal_voltage_high;
|
||||
bool power;
|
||||
bool keyphase;
|
||||
int keyphase_slot;
|
||||
int keyphase_ch;
|
||||
} SeismicMonitor;
|
||||
|
||||
typedef enum {
|
||||
|
@ -591,7 +591,17 @@ void MainWindow::on_pushButton_save_clicked() {
|
||||
|
||||
void MainWindow::on_pushButton_open_clicked() {
|
||||
|
||||
|
||||
map_slot_config.clear();
|
||||
QList<QAbstractButton *> buttonList = btnGroup_slot->buttons();
|
||||
for (int i = 0; i < buttonList.count(); i++) {
|
||||
buttonList[i]->setText("");
|
||||
}
|
||||
for (int i = 0; i < SLOT_NUM; i++) {
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
||||
if(base_ptr != nullptr){
|
||||
ConfigMgr::Instance()->RemoveCard(base_ptr);
|
||||
}
|
||||
}
|
||||
tsi_config_file = QFileDialog::getOpenFileName(this, tr("选择文件"), tr(""), tr("*.json"));
|
||||
QFileInfo fileinfo;
|
||||
fileinfo = QFileInfo(tsi_config_file);
|
||||
@ -605,16 +615,6 @@ void MainWindow::on_pushButton_open_clicked() {
|
||||
qWarning() << "Failed to open update file.";
|
||||
return;
|
||||
}
|
||||
QList<QAbstractButton *> buttonList = btnGroup_slot->buttons();
|
||||
for (int i = 0; i < buttonList.count(); i++) {
|
||||
buttonList[i]->setText("");
|
||||
}
|
||||
for (int i = 0; i < SLOT_NUM; i++) {
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
||||
if(base_ptr != nullptr){
|
||||
ConfigMgr::Instance()->RemoveCard(base_ptr);
|
||||
}
|
||||
}
|
||||
ConfigMgr::Instance()->Load(tsi_config_file);
|
||||
for (int i = 0; i < buttonList.count(); i++) {
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(i + 1);
|
||||
|
@ -10,7 +10,7 @@ RangeSlider::RangeSlider(int style_,QWidget *parent)
|
||||
style = style_;
|
||||
}
|
||||
|
||||
void RangeSlider::setRange(float min, float max) {
|
||||
void RangeSlider::setRange(int min, int max) {
|
||||
m_min = min;
|
||||
m_max = max;
|
||||
m_lower = qBound(m_min, m_lower, m_max);
|
||||
|
@ -9,7 +9,7 @@ class RangeSlider : public QWidget {
|
||||
public:
|
||||
explicit RangeSlider(int style_ = 0,QWidget *parent = nullptr);
|
||||
|
||||
void setRange(float min, float max);
|
||||
void setRange(int min, int max);
|
||||
void setSliderWidth(int width); // 新增方法:设置宽度
|
||||
float lowerValue() const;
|
||||
float upperValue() const;
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "data_config.h"
|
||||
#include "config_mgr.h"
|
||||
#include "vibrationdata.h"
|
||||
#include "trust.h"
|
||||
|
||||
Seismic_monitor::Seismic_monitor(int slot,int cardtype, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@ -49,7 +48,6 @@ void Seismic_monitor::Init() {
|
||||
// ui->comboBox_transducer_name_3->addItem(vec_transducer[var].transducer_name);
|
||||
// ui->comboBox_transducer_name_4->addItem(vec_transducer[var].transducer_name);
|
||||
// }
|
||||
int slot = 0;
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no);
|
||||
if (base_ptr == nullptr) {
|
||||
qDebug() << "base_ptr";
|
||||
@ -61,18 +59,6 @@ void Seismic_monitor::Init() {
|
||||
UpdateData(vib_data);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < SLOT_NUM; ++i) {
|
||||
if (ConfigMgr::Instance()->card_type_[i] == kCardNone) {
|
||||
continue;
|
||||
}
|
||||
QJsonObject card_item;
|
||||
slot = i + 1;
|
||||
card_item["type"] = ConfigMgr::Instance()->card_type_[i];
|
||||
card_item["slot"] = slot;
|
||||
if (ConfigMgr::Instance()->card_type_[i] == kCardKeyphaseSingle ) {
|
||||
ui->comboBox_keyphase_slot->addItem(QString::number(slot));
|
||||
}
|
||||
}
|
||||
std::shared_ptr<VibrationData> vib_data = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||
for (int i = 0; i < CHANNEL_COUNT; i++) {
|
||||
if (i + 1 == 1) {
|
||||
@ -132,9 +118,6 @@ void Seismic_monitor::UpdateData(std::shared_ptr<VibrationData> vib_data) {
|
||||
vib_data->base_config_[var].normal_voltage_high = ui->doubleSpinBox_high_1->value();
|
||||
vib_data->base_config_[var].power = ui->checkBox_power_1->isChecked();
|
||||
vib_data->base_config_[var].chan_id = QString("S%1C%2").arg(QString::number(slot_no, 10).rightJustified(2, '0')).arg(QString::number(var+1, 10).rightJustified(2, '0'));
|
||||
vib_data->base_config_[var].keyphase = ui->checkBox_keyphase->isChecked();
|
||||
vib_data->base_config_[var].keyphase_slot = ui->comboBox_keyphase_slot->currentText().toInt();
|
||||
vib_data->base_config_[var].keyphase_ch = ui->comboBox_keyphase_ch->currentText().toInt();
|
||||
} else if (var + 1 == 2) {
|
||||
vib_data->base_config_[var].standby = ui->checkBox_standby_1->isChecked();
|
||||
vib_data->base_config_[var].active = ui->checkBox_enable_2->isChecked();
|
||||
@ -147,9 +130,6 @@ void Seismic_monitor::UpdateData(std::shared_ptr<VibrationData> vib_data) {
|
||||
vib_data->base_config_[var].normal_voltage_high = ui->doubleSpinBox_high_2->value();
|
||||
vib_data->base_config_[var].power = ui->checkBox_power_2->isChecked();
|
||||
vib_data->base_config_[var].chan_id = QString("S%1C%2").arg(QString::number(slot_no, 10).rightJustified(2, '0')).arg(QString::number(var+1, 10).rightJustified(2, '0'));
|
||||
vib_data->base_config_[var].keyphase = ui->checkBox_keyphase_2->isChecked();
|
||||
vib_data->base_config_[var].keyphase_slot = ui->comboBox_keyphase_slot_2->currentText().toInt();
|
||||
vib_data->base_config_[var].keyphase_ch = ui->comboBox_keyphase_ch_2->currentText().toInt();
|
||||
} else if (var + 1 == 3) {
|
||||
vib_data->base_config_[var].standby = ui->checkBox_standby_2->isChecked();
|
||||
vib_data->base_config_[var].active = ui->checkBox_enable_3->isChecked();
|
||||
@ -162,9 +142,6 @@ void Seismic_monitor::UpdateData(std::shared_ptr<VibrationData> vib_data) {
|
||||
vib_data->base_config_[var].normal_voltage_high = ui->doubleSpinBox_high_3->value();
|
||||
vib_data->base_config_[var].power = ui->checkBox_power_3->isChecked();
|
||||
vib_data->base_config_[var].chan_id = QString("S%1C%2").arg(QString::number(slot_no, 10).rightJustified(2, '0')).arg(QString::number(var+1, 10).rightJustified(2, '0'));
|
||||
vib_data->base_config_[var].keyphase = ui->checkBox_keyphase_3->isChecked();
|
||||
vib_data->base_config_[var].keyphase_slot = ui->comboBox_keyphase_slot_3->currentText().toInt();
|
||||
vib_data->base_config_[var].keyphase_ch = ui->comboBox_keyphase_ch_3->currentText().toInt();
|
||||
} else if (var + 1 == 4) {
|
||||
vib_data->base_config_[var].standby = ui->checkBox_standby_2->isChecked();
|
||||
vib_data->base_config_[var].active = ui->checkBox_enable_4->isChecked();
|
||||
@ -177,9 +154,6 @@ void Seismic_monitor::UpdateData(std::shared_ptr<VibrationData> vib_data) {
|
||||
vib_data->base_config_[var].normal_voltage_high = ui->doubleSpinBox_high_4->value();
|
||||
vib_data->base_config_[var].power = ui->checkBox_power_4->isChecked();
|
||||
vib_data->base_config_[var].chan_id = QString("S%1C%2").arg(QString::number(slot_no, 10).rightJustified(2, '0')).arg(QString::number(var+1, 10).rightJustified(2, '0'));
|
||||
vib_data->base_config_[var].keyphase = ui->checkBox_keyphase_4->isChecked();
|
||||
vib_data->base_config_[var].keyphase_slot = ui->comboBox_keyphase_slot_4->currentText().toInt();
|
||||
vib_data->base_config_[var].keyphase_ch = ui->comboBox_keyphase_ch_4->currentText().toInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -215,10 +189,6 @@ void Seismic_monitor::on_pushButton_config_1_clicked() {
|
||||
Velocity *velocity = new Velocity(slot_no, channel, ui->checkBox_enable_1->isChecked());
|
||||
velocity->setWindowModality(Qt::ApplicationModal);
|
||||
velocity->show();
|
||||
}else if (ui->comboBox_chan_type_1->currentIndex() == kVibThrust) {
|
||||
Trust *trust = new Trust(slot_no, channel, ui->checkBox_enable_1->isChecked());
|
||||
trust->setWindowModality(Qt::ApplicationModal);
|
||||
trust->show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,10 +206,6 @@ void Seismic_monitor::on_pushButton_config_2_clicked() {
|
||||
Velocity *velocity = new Velocity(slot_no, channel, ui->checkBox_enable_2->isChecked());
|
||||
velocity->setWindowModality(Qt::ApplicationModal);
|
||||
velocity->show();
|
||||
}else if (ui->comboBox_chan_type_2->currentIndex() == kVibThrust) {
|
||||
Trust *trust = new Trust(slot_no, channel, ui->checkBox_enable_1->isChecked());
|
||||
trust->setWindowModality(Qt::ApplicationModal);
|
||||
trust->show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,10 +223,6 @@ void Seismic_monitor::on_pushButton_config_3_clicked() {
|
||||
Velocity *velocity = new Velocity(slot_no, channel, ui->checkBox_enable_3->isChecked());
|
||||
velocity->setWindowModality(Qt::ApplicationModal);
|
||||
velocity->show();
|
||||
}else if (ui->comboBox_chan_type_3->currentIndex() == kVibThrust) {
|
||||
Trust *trust = new Trust(slot_no, channel, ui->checkBox_enable_1->isChecked());
|
||||
trust->setWindowModality(Qt::ApplicationModal);
|
||||
trust->show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,10 +240,6 @@ void Seismic_monitor::on_pushButton_config_4_clicked() {
|
||||
Velocity *velocity = new Velocity(slot_no, channel, ui->checkBox_enable_4->isChecked());
|
||||
velocity->setWindowModality(Qt::ApplicationModal);
|
||||
velocity->show();
|
||||
}else if (ui->comboBox_chan_type_4->currentIndex() == kVibThrust) {
|
||||
Trust *trust = new Trust(slot_no, channel, ui->checkBox_enable_1->isChecked());
|
||||
trust->setWindowModality(Qt::ApplicationModal);
|
||||
trust->show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,9 +254,6 @@ void Seismic_monitor::on_comboBox_chan_type_1_currentTextChanged(const QString &
|
||||
case kVibVelocity:
|
||||
ui->label_unit_1->setText("mV / mm/s");
|
||||
break;
|
||||
case kVibThrust:
|
||||
ui->label_unit_1->setText("mV / mil");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -313,9 +268,6 @@ void Seismic_monitor::on_comboBox_chan_type_2_currentTextChanged(const QString &
|
||||
case kVibVelocity:
|
||||
ui->label_unit_2->setText("mV / mm/s");
|
||||
break;
|
||||
case kVibThrust:
|
||||
ui->label_unit_2->setText("mV / mil");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -330,9 +282,6 @@ void Seismic_monitor::on_comboBox_chan_type_3_currentTextChanged(const QString &
|
||||
case kVibVelocity:
|
||||
ui->label_unit_3->setText("mV / mm/s");
|
||||
break;
|
||||
case kVibThrust:
|
||||
ui->label_unit_3->setText("mV / mil");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -347,9 +296,6 @@ void Seismic_monitor::on_comboBox_chan_type_4_currentTextChanged(const QString &
|
||||
case kVibVelocity:
|
||||
ui->label_unit_4->setText("mV / mm/s");
|
||||
break;
|
||||
case kVibThrust:
|
||||
ui->label_unit_4->setText("mV / mil");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -388,45 +334,3 @@ void Seismic_monitor::on_comboBox_transducer_name_4_currentTextChanged(const QSt
|
||||
}
|
||||
}
|
||||
}
|
||||
void Seismic_monitor::EnableKeyphase(){
|
||||
ui->checkBox_keyphase->setCheckable(true);
|
||||
ui->checkBox_keyphase->setEnabled(true);
|
||||
ui->comboBox_keyphase_ch->setEnabled(true);
|
||||
ui->comboBox_keyphase_slot->setEnabled(true);
|
||||
|
||||
ui->checkBox_keyphase_2->setCheckable(true);
|
||||
ui->checkBox_keyphase_2->setEnabled(true);
|
||||
ui->comboBox_keyphase_ch_2->setEnabled(true);
|
||||
ui->comboBox_keyphase_slot_2->setEnabled(true);
|
||||
|
||||
ui->checkBox_keyphase_3->setCheckable(true);
|
||||
ui->checkBox_keyphase_3->setEnabled(true);
|
||||
ui->comboBox_keyphase_ch_3->setEnabled(true);
|
||||
ui->comboBox_keyphase_slot_3->setEnabled(true);
|
||||
|
||||
ui->checkBox_keyphase_4->setCheckable(true);
|
||||
ui->checkBox_keyphase_4->setEnabled(true);
|
||||
ui->comboBox_keyphase_ch_4->setEnabled(true);
|
||||
ui->comboBox_keyphase_slot_4->setEnabled(true);
|
||||
}
|
||||
void Seismic_monitor::DisableKeyphase(){
|
||||
ui->checkBox_keyphase->setCheckable(false);
|
||||
ui->checkBox_keyphase->setEnabled(false);
|
||||
ui->comboBox_keyphase_ch->setEnabled(false);
|
||||
ui->comboBox_keyphase_slot->setEnabled(false);
|
||||
|
||||
ui->checkBox_keyphase_2->setCheckable(false);
|
||||
ui->checkBox_keyphase_2->setEnabled(false);
|
||||
ui->comboBox_keyphase_ch_2->setEnabled(false);
|
||||
ui->comboBox_keyphase_slot_2->setEnabled(false);
|
||||
|
||||
ui->checkBox_keyphase_3->setCheckable(false);
|
||||
ui->checkBox_keyphase_3->setEnabled(false);
|
||||
ui->comboBox_keyphase_ch_3->setEnabled(false);
|
||||
ui->comboBox_keyphase_slot_3->setEnabled(false);
|
||||
|
||||
ui->checkBox_keyphase_4->setCheckable(false);
|
||||
ui->checkBox_keyphase_4->setEnabled(false);
|
||||
ui->comboBox_keyphase_ch_4->setEnabled(false);
|
||||
ui->comboBox_keyphase_slot_4->setEnabled(false);
|
||||
}
|
||||
|
@ -57,8 +57,6 @@ class Seismic_monitor : public QWidget {
|
||||
// SeismicMonitor seismic_monitor[CHANNLE_COUNT];
|
||||
QVector<Transducer> vec_transducer;
|
||||
void Init();
|
||||
void EnableKeyphase();
|
||||
void DisableKeyphase();
|
||||
};
|
||||
|
||||
#endif // SEISMIC_MONITOR_H
|
||||
|
3482
seismic_monitor.ui
3482
seismic_monitor.ui
File diff suppressed because it is too large
Load Diff
39
setpoint.cpp
39
setpoint.cpp
@ -191,45 +191,6 @@ void Setpoint::update()
|
||||
ui->label_direct->setText("um");
|
||||
ui->label_danger->setText("um");
|
||||
|
||||
}
|
||||
if(setpoint_data->base_config_[chan].channel_type == kVibThrust){
|
||||
ui->label_27->hide();
|
||||
ui->label_1x->hide();
|
||||
ui->lineEdit_1x_ampl_upper->hide();
|
||||
ui->widget_1x_ampl->hide();
|
||||
ui->lineEdit_1x_ampl_lower->hide();
|
||||
ui->checkBox_1x_ampl->hide();
|
||||
|
||||
ui->label_32->hide();
|
||||
ui->label_2x->hide();
|
||||
ui->lineEdit_2x_ampl_upper->hide();
|
||||
ui->widget_2x_ampl->hide();
|
||||
ui->lineEdit_2x_ampl_lower->hide();
|
||||
ui->checkBox_2x_ampl->hide();
|
||||
ui->label_direct->setText("mil");
|
||||
ui->label_danger->setText("mil");
|
||||
if(variable_[chan]->direct_.full_scale_range == 0){
|
||||
slider_direct->setRange(-25,25);
|
||||
slider_danger->setRange(-25,25);
|
||||
}else if(variable_[chan]->direct_.full_scale_range == 1){
|
||||
slider_direct->setRange(-30,30);
|
||||
slider_danger->setRange(-30,30);
|
||||
}else if(variable_[chan]->direct_.full_scale_range == 2){
|
||||
slider_direct->setRange(-40,40);
|
||||
slider_danger->setRange(-40,40);
|
||||
}else if(variable_[chan]->direct_.full_scale_range == 3){
|
||||
ui->label_direct->setText("mm");
|
||||
ui->label_danger->setText("mm");
|
||||
slider_direct->setRange(-0.5,0.5);
|
||||
slider_danger->setRange(-0.5,0.5);
|
||||
}else if(variable_[chan]->direct_.full_scale_range == 4){
|
||||
ui->label_direct->setText("mm");
|
||||
ui->label_danger->setText("mm");
|
||||
slider_direct->setRange(-1,1);
|
||||
slider_danger->setRange(-1,1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(setpoint_data->base_config_[chan].channel_type == kVibAcc){
|
||||
std::shared_ptr<VariableBase> base_channel_ptr = setpoint_data->GetChannelPtr(chan + 1);
|
||||
|
145
trust.cpp
145
trust.cpp
@ -1,145 +0,0 @@
|
||||
#include "trust.h"
|
||||
#include "ui_trust.h"
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
|
||||
#include "data_config.h"
|
||||
#include "vibrationdata.h"
|
||||
#include "config_mgr.h"
|
||||
|
||||
Trust::Trust(int slot_no_, int channel_, bool active,QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::Trust)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
slot_no = slot_no_;
|
||||
channel = channel_;
|
||||
QString chan = QString("%1").arg(channel);
|
||||
QString slot = QString("%1").arg(slot_no);
|
||||
ui->label_channel->setText(chan);
|
||||
ui->label_slot->setText(slot);
|
||||
if (active) {
|
||||
ui->label_active->setText("(启用)");
|
||||
} else {
|
||||
ui->label_active->setText("(停用)");
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
Trust::~Trust()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
void Trust::Init() {
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no);
|
||||
if (base_ptr == nullptr) {
|
||||
qCritical() << "[Radial::Init] should not be here";
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||
if (ptr->base_config_[channel - 1].channel_type != kVibThrust) {
|
||||
qDebug() << "[Radial::Init] channel type changes";
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(channel);
|
||||
if (variable_base == nullptr) {
|
||||
qDebug() << "[Radial::Init] no channel ptr";
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<ThrustVariable> variable_ptr = std::dynamic_pointer_cast<ThrustVariable>(variable_base);
|
||||
ui->checkBox_low_pass->setChecked(variable_ptr->filter_[0].checked);
|
||||
ui->spinBox_low_pass_low->setValue(variable_ptr->filter_[0].low);
|
||||
ui->spinBox_low_pass_high->setValue(variable_ptr->filter_[0].high);
|
||||
ui->checkBox_high_pass->setChecked(variable_ptr->filter_[1].checked);
|
||||
ui->spinBox_high_pass_low->setValue(variable_ptr->filter_[1].low);
|
||||
ui->spinBox_high_pass_high->setValue(variable_ptr->filter_[1].high);
|
||||
ui->checkBox_band_pass->setChecked(variable_ptr->filter_[2].checked);
|
||||
ui->spinBox_band_pass_low->setValue(variable_ptr->filter_[2].low);
|
||||
ui->spinBox_band_pass_high->setValue(variable_ptr->filter_[2].high);
|
||||
ui->comboBox_direct_value_range->setCurrentIndex(variable_ptr->direct_.full_scale_range);
|
||||
ui->doubleSpinBox_direct_clamp->setValue(variable_ptr->direct_.clamp_value);
|
||||
// ui->label_bias_voltage->setText(QString::number(variable_ptr->direct_.bias_voltage));
|
||||
// ui->doubleSpinBox_bias_volt_clamp->setValue(variables[i].clamp_value);
|
||||
// ui->comboBox_bias_volt_range->setCurrentIndex();
|
||||
ui->spinBox_alert->setValue(variable_ptr->delay_.alert);
|
||||
ui->doubleSpinBox_danger->setValue(variable_ptr->delay_.danger);
|
||||
ui->checkBox_100ms->setChecked(variable_ptr->delay_.active_100ms);
|
||||
ui->checkBox_alert_latching->setChecked(variable_ptr->alert_latching_);
|
||||
ui->checkBox_danger_latching->setChecked(variable_ptr->danger_latching_);
|
||||
ui->comboBox_recorder_output->setCurrentIndex(variable_ptr->recorder_out_.recorder_output);
|
||||
ui->checkBox_two_ma_clamp->setChecked(variable_ptr->recorder_out_.two_ma_clamp);
|
||||
}
|
||||
void Trust::on_pushButton_confirm_clicked()
|
||||
{
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no);
|
||||
if (base_ptr == nullptr) {
|
||||
qCritical() << "[Radial::Init] should not be here";
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<VibrationData> ptr = std::dynamic_pointer_cast<VibrationData>(base_ptr);
|
||||
std::shared_ptr<VariableBase> variable_base = ptr->GetChannelPtr(channel);
|
||||
if (variable_base == nullptr || variable_base->type_ != kVibThrust) {
|
||||
if (variable_base == nullptr) {
|
||||
qDebug() << "no channel ptr";
|
||||
} else {
|
||||
ptr->RemoveChannel(channel);
|
||||
qDebug() << "channel type change";
|
||||
}
|
||||
std::shared_ptr<ThrustVariable> variable = std::make_shared<ThrustVariable>();
|
||||
variable->id_ = channel;
|
||||
variable->type_ = kVibThrust;
|
||||
variable->filter_[0].checked = ui->checkBox_low_pass->isChecked();
|
||||
variable->filter_[0].low = ui->spinBox_low_pass_low->value();
|
||||
variable->filter_[0].high = ui->spinBox_low_pass_high->value();
|
||||
variable->filter_[1].checked = ui->checkBox_high_pass->isChecked();
|
||||
variable->filter_[1].low = ui->spinBox_high_pass_low->value();
|
||||
variable->filter_[1].high = ui->spinBox_high_pass_high->value();
|
||||
variable->filter_[2].checked = ui->checkBox_band_pass->isChecked();
|
||||
variable->filter_[2].low = ui->spinBox_band_pass_low->value();
|
||||
variable->filter_[2].high = ui->spinBox_band_pass_high->value();
|
||||
variable->direct_.full_scale_range = ui->comboBox_direct_value_range->currentIndex();
|
||||
variable->direct_.clamp_value = ui->doubleSpinBox_direct_clamp->value();
|
||||
variable->direct_.custom = 0; // TODO:
|
||||
variable->recorder_out_.recorder_output = ui->comboBox_recorder_output->currentIndex();
|
||||
variable->recorder_out_.two_ma_clamp = ui->checkBox_two_ma_clamp->isChecked();
|
||||
variable->delay_.alert = ui->spinBox_alert->value();
|
||||
variable->delay_.danger = ui->doubleSpinBox_danger->value();
|
||||
variable->delay_.active_100ms = ui->checkBox_100ms->isChecked();
|
||||
variable->alert_latching_ = ui->checkBox_alert_latching->isChecked();
|
||||
variable->danger_latching_ = ui->checkBox_danger_latching->isChecked();
|
||||
ptr->variables_.push_back(variable);
|
||||
this->close();
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<ThrustVariable> variable = std::dynamic_pointer_cast<ThrustVariable>(variable_base);
|
||||
variable->filter_[0].checked = ui->checkBox_low_pass->isChecked();
|
||||
variable->filter_[0].low = ui->spinBox_low_pass_low->value();
|
||||
variable->filter_[0].high = ui->spinBox_low_pass_high->value();
|
||||
variable->filter_[1].checked = ui->checkBox_high_pass->isChecked();
|
||||
variable->filter_[1].low = ui->spinBox_high_pass_low->value();
|
||||
variable->filter_[1].high = ui->spinBox_high_pass_high->value();
|
||||
variable->filter_[2].checked = ui->checkBox_band_pass->isChecked();
|
||||
variable->filter_[2].low = ui->spinBox_band_pass_low->value();
|
||||
variable->filter_[2].high = ui->spinBox_band_pass_high->value();
|
||||
variable->direct_.full_scale_range = ui->comboBox_direct_value_range->currentIndex();
|
||||
variable->direct_.clamp_value = ui->doubleSpinBox_direct_clamp->value();
|
||||
variable->direct_.custom = 0; // TODO:
|
||||
variable->recorder_out_.recorder_output = ui->comboBox_recorder_output->currentIndex();
|
||||
variable->recorder_out_.two_ma_clamp = ui->checkBox_two_ma_clamp->isChecked();
|
||||
variable->delay_.alert = ui->spinBox_alert->value();
|
||||
variable->delay_.danger = ui->doubleSpinBox_danger->value();
|
||||
variable->delay_.active_100ms = ui->checkBox_100ms->isChecked();
|
||||
variable->alert_latching_ = ui->checkBox_alert_latching->isChecked();
|
||||
variable->danger_latching_ = ui->checkBox_danger_latching->isChecked();
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void Trust::on_pushButton_cancel_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
30
trust.h
30
trust.h
@ -1,30 +0,0 @@
|
||||
#ifndef TRUST_H
|
||||
#define TRUST_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class Trust;
|
||||
}
|
||||
|
||||
class Trust : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Trust(int slot_no_, int channel_, bool active,QWidget *parent = nullptr);
|
||||
~Trust();
|
||||
int slot_no;
|
||||
int channel;
|
||||
|
||||
private slots:
|
||||
void on_pushButton_confirm_clicked();
|
||||
|
||||
void on_pushButton_cancel_clicked();
|
||||
|
||||
private:
|
||||
Ui::Trust *ui;
|
||||
void Init();
|
||||
};
|
||||
|
||||
#endif // TRUST_H
|
818
trust.ui
818
trust.ui
@ -1,818 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Trust</class>
|
||||
<widget class="QWidget" name="Trust">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>691</width>
|
||||
<height>505</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>651</width>
|
||||
<height>381</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
<string>传感器和滤波配置</string>
|
||||
</attribute>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>353</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>滤波</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_high_pass">
|
||||
<property name="text">
|
||||
<string>高通:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_high_pass_low">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_33">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_high_pass_high">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_32">
|
||||
<property name="text">
|
||||
<string>3 - 3000Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_low_pass">
|
||||
<property name="text">
|
||||
<string>低通:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_low_pass_low">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_30">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_low_pass_high">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_29">
|
||||
<property name="text">
|
||||
<string>30 - 30000Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_band_pass">
|
||||
<property name="text">
|
||||
<string>带通:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_band_pass_low">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_34">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_band_pass_high">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="text">
|
||||
<string>3 - 3000Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_6">
|
||||
<attribute name="title">
|
||||
<string>特征值和警报配置</string>
|
||||
</attribute>
|
||||
<widget class="QGroupBox" name="groupBox_11">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>411</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string> 特征值</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_71">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>54</width>
|
||||
<height>12</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>直接值</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_72">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>间隙</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_73">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>141</x>
|
||||
<y>31</y>
|
||||
<width>48</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取值范围</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_74">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>31</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> 默认值</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_direct_value_range">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>50</y>
|
||||
<width>111</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25-0-25 mil</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>30-0-30 mil</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>40-0-40 mil</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0.5-0-0.5 mm</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.0-0-1.0 mm</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_direct_clamp">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>50</y>
|
||||
<width>62</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_gap_clamp">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>80</y>
|
||||
<width>62</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_gap_range">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>80</y>
|
||||
<width>111</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>-24 Vdc</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-100 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-150 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-200 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-400 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0-500 um</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>自定义</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_12">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>190</y>
|
||||
<width>221</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string> 延时</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_78">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>54</width>
|
||||
<height>12</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> 告警</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_79">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>54</width>
|
||||
<height>12</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> 危险</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_danger">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>50</y>
|
||||
<width>61</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>99.900000000000006</double>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_100ms">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>80</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>100 ms</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_80">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>20</y>
|
||||
<width>54</width>
|
||||
<height>12</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1 - 60s</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_81">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>50</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1.0 - 60.0s</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="spinBox_alert">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>61</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latching">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>470</x>
|
||||
<y>20</y>
|
||||
<width>131</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>告警锁定</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_latching">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>470</x>
|
||||
<y>40</y>
|
||||
<width>131</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>危险锁定</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_84">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>130</y>
|
||||
<width>54</width>
|
||||
<height>12</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>记录输出</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_recorder_output">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>150</y>
|
||||
<width>141</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>无</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>直接幅值</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>间隙</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_two_ma_clamp">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>180</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2 mA 默认值</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_timed_ok">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>470</x>
|
||||
<y>60</y>
|
||||
<width>181</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> Timed OK channel Defeat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>21</x>
|
||||
<y>10</y>
|
||||
<width>105</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_58">
|
||||
<property name="text">
|
||||
<string>通道:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_channel">
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_active">
|
||||
<property name="text">
|
||||
<string>(启用)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>450</y>
|
||||
<width>632</width>
|
||||
<height>37</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_confirm">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_set_default">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>设置为默认值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_cancel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_print">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>打印</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_help">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>341</x>
|
||||
<y>10</y>
|
||||
<width>63</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_57">
|
||||
<property name="text">
|
||||
<string>槽位号:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_slot">
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
22
trust_ds.h
22
trust_ds.h
@ -1,22 +0,0 @@
|
||||
#ifndef TRUST_DS_H
|
||||
#define TRUST_DS_H
|
||||
|
||||
// 位移峰峰值的量程范围
|
||||
typedef enum {
|
||||
kDisPP25 = 0, // 25-0-25 mil
|
||||
kDisPP30 = 1, // 30-0-30 mil
|
||||
kDisPP40 = 2, // 40-0-40 mil
|
||||
kDisPP0p5 = 3, // 0.5-0-0.5 mm
|
||||
kDisPP1p0 = 4, // 1.0-0-1.0 mm
|
||||
kDisPPCustom = 5 // custom
|
||||
} DisPPFullScaleRange;
|
||||
|
||||
// recorder out
|
||||
typedef enum {
|
||||
kDisRecorderOutNone = 0,
|
||||
kDisRecorderOutDirectAmpl = 1,
|
||||
kDisRecorderOutGap = 2
|
||||
} DisRecorderOut;
|
||||
|
||||
|
||||
#endif // TRUST_DS_H
|
Loading…
x
Reference in New Issue
Block a user