add temp code
This commit is contained in:
parent
ec2d25398c
commit
b1a776bfda
109
acceleration.cpp
109
acceleration.cpp
@ -151,8 +151,59 @@ void Acceleration::on_pushButton_confirm_clicked() {
|
||||
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();
|
||||
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
// -freband output
|
||||
variable->freband_output[0].enable = ui->checkBox_enable->isChecked();
|
||||
variable->freband_output[0].start = ui->lineEdit_start->text().toDouble();
|
||||
variable->freband_output[0].end = ui->lineEdit_end->text().toDouble();
|
||||
variable->freband_output[1].enable = ui->checkBox_enable_2->isChecked();
|
||||
variable->freband_output[1].start = ui->lineEdit_start_2->text().toDouble();
|
||||
variable->freband_output[1].end = ui->lineEdit_end_2->text().toDouble();
|
||||
variable->freband_output[2].enable = ui->checkBox_enable_3->isChecked();
|
||||
variable->freband_output[2].start = ui->lineEdit_start_3->text().toDouble();
|
||||
variable->freband_output[2].end = ui->lineEdit_end_3->text().toDouble();
|
||||
variable->freband_output[3].enable = ui->checkBox_enable_4->isChecked();
|
||||
variable->freband_output[3].start = ui->lineEdit_start_4->text().toDouble();
|
||||
variable->freband_output[3].end = ui->lineEdit_end_4->text().toDouble();
|
||||
variable->freband_output[4].enable = ui->checkBox_enable_5->isChecked();
|
||||
variable->freband_output[4].start = ui->lineEdit_start_5->text().toDouble();
|
||||
variable->freband_output[4].end = ui->lineEdit_end_5->text().toDouble();
|
||||
variable->freband_output[5].enable = ui->checkBox_enable_6->isChecked();
|
||||
variable->freband_output[5].start = ui->lineEdit_start_6->text().toDouble();
|
||||
variable->freband_output[5].end = ui->lineEdit_end_6->text().toDouble();
|
||||
variable->freband_output[6].enable = ui->checkBox_enable_7->isChecked();
|
||||
variable->freband_output[6].start = ui->lineEdit_start_7->text().toDouble();
|
||||
variable->freband_output[6].end = ui->lineEdit_end_7->text().toDouble();
|
||||
variable->freband_output[7].enable = ui->checkBox_enable_8->isChecked();
|
||||
variable->freband_output[7].start = ui->lineEdit_start_8->text().toDouble();
|
||||
variable->freband_output[7].end = ui->lineEdit_end_8->text().toDouble();
|
||||
variable->freband_output[8].enable = ui->checkBox_enable_9->isChecked();
|
||||
variable->freband_output[8].start = ui->lineEdit_start_9->text().toDouble();
|
||||
variable->freband_output[8].end = ui->lineEdit_end_9->text().toDouble();
|
||||
variable->freband_output[9].enable = ui->checkBox_enable_10->isChecked();
|
||||
variable->freband_output[9].start = ui->lineEdit_start_10->text().toDouble();
|
||||
variable->freband_output[9].end = ui->lineEdit_end_10->text().toDouble();
|
||||
ptr->variables_.push_back(variable);
|
||||
this->close();
|
||||
return;
|
||||
@ -167,7 +218,59 @@ void Acceleration::on_pushButton_confirm_clicked() {
|
||||
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();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
// -freband output
|
||||
variable->freband_output[0].enable = ui->checkBox_enable->isChecked();
|
||||
variable->freband_output[0].start = ui->lineEdit_start->text().toDouble();
|
||||
variable->freband_output[0].end = ui->lineEdit_end->text().toDouble();
|
||||
variable->freband_output[1].enable = ui->checkBox_enable_2->isChecked();
|
||||
variable->freband_output[1].start = ui->lineEdit_start_2->text().toDouble();
|
||||
variable->freband_output[1].end = ui->lineEdit_end_2->text().toDouble();
|
||||
variable->freband_output[2].enable = ui->checkBox_enable_3->isChecked();
|
||||
variable->freband_output[2].start = ui->lineEdit_start_3->text().toDouble();
|
||||
variable->freband_output[2].end = ui->lineEdit_end_3->text().toDouble();
|
||||
variable->freband_output[3].enable = ui->checkBox_enable_4->isChecked();
|
||||
variable->freband_output[3].start = ui->lineEdit_start_4->text().toDouble();
|
||||
variable->freband_output[3].end = ui->lineEdit_end_4->text().toDouble();
|
||||
variable->freband_output[4].enable = ui->checkBox_enable_5->isChecked();
|
||||
variable->freband_output[4].start = ui->lineEdit_start_5->text().toDouble();
|
||||
variable->freband_output[4].end = ui->lineEdit_end_5->text().toDouble();
|
||||
variable->freband_output[5].enable = ui->checkBox_enable_6->isChecked();
|
||||
variable->freband_output[5].start = ui->lineEdit_start_6->text().toDouble();
|
||||
variable->freband_output[5].end = ui->lineEdit_end_6->text().toDouble();
|
||||
variable->freband_output[6].enable = ui->checkBox_enable_7->isChecked();
|
||||
variable->freband_output[6].start = ui->lineEdit_start_7->text().toDouble();
|
||||
variable->freband_output[6].end = ui->lineEdit_end_7->text().toDouble();
|
||||
variable->freband_output[7].enable = ui->checkBox_enable_8->isChecked();
|
||||
variable->freband_output[7].start = ui->lineEdit_start_8->text().toDouble();
|
||||
variable->freband_output[7].end = ui->lineEdit_end_8->text().toDouble();
|
||||
variable->freband_output[8].enable = ui->checkBox_enable_9->isChecked();
|
||||
variable->freband_output[8].start = ui->lineEdit_start_9->text().toDouble();
|
||||
variable->freband_output[8].end = ui->lineEdit_end_9->text().toDouble();
|
||||
variable->freband_output[9].enable = ui->checkBox_enable_10->isChecked();
|
||||
variable->freband_output[9].start = ui->lineEdit_start_10->text().toDouble();
|
||||
variable->freband_output[9].end = ui->lineEdit_end_10->text().toDouble();
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,13 @@ class VariableBase {
|
||||
AlarmAlertHigh alert_high;
|
||||
AlarmDangerLow danger_low;
|
||||
AlarmAlertLow alert_low;
|
||||
|
||||
General gap_general;
|
||||
AlarmDangerHigh gap_danger_high;
|
||||
AlarmAlertHigh gap_alert_high;
|
||||
AlarmDangerLow gap_danger_low;
|
||||
AlarmAlertLow gap_alert_low;
|
||||
|
||||
FrequencybandOutput freband_output[10];
|
||||
};
|
||||
|
||||
|
221
config_mgr.cpp
221
config_mgr.cpp
@ -133,41 +133,56 @@ void ConfigMgr::Save(QString & file_path) {
|
||||
band_pass["checked"] = radial_ptr->filter_[2].checked;
|
||||
filter.append(band_pass);
|
||||
variables["filter"] = filter;
|
||||
QJsonObject direct;
|
||||
QJsonObject x1;
|
||||
QJsonObject x2;
|
||||
QJsonObject recorder_out;
|
||||
QJsonObject delay;
|
||||
QJsonArray latching;
|
||||
direct["full_scale_range"] = radial_ptr->direct_.full_scale_range;
|
||||
direct["clamp_value"] = radial_ptr->direct_.clamp_value;
|
||||
direct["custom"] = radial_ptr->direct_.custom;
|
||||
variables["direct"] = direct;
|
||||
x1["checked"] = radial_ptr->x1_.checked;
|
||||
x1["full_scale_range"] = radial_ptr->x1_.full_scale_range;
|
||||
x1["clamp_value"] = radial_ptr->x1_.clamp_value;
|
||||
x1["custom"] = radial_ptr->x1_.custom;
|
||||
x1["phase_lag"] = radial_ptr->x1_.phase_lag;
|
||||
variables["x1"] = x1;
|
||||
x2["checked"] = radial_ptr->x2_.checked;
|
||||
x2["full_scale_range"] = radial_ptr->x2_.full_scale_range;
|
||||
x2["clamp_value"] = radial_ptr->x2_.clamp_value;
|
||||
x2["custom"] = radial_ptr->x2_.custom;
|
||||
x2["phase_lag"] = radial_ptr->x2_.phase_lag;
|
||||
variables["x2"] = x2;
|
||||
recorder_out["recorder_output"] = radial_ptr->recorder_out_.recorder_output;
|
||||
recorder_out["two_ma_clamp"] = radial_ptr->recorder_out_.two_ma_clamp;
|
||||
recorder_out["trip_multiply"] = radial_ptr->recorder_out_.trip_multiply;
|
||||
recorder_out["comparision"] = radial_ptr->recorder_out_.comparision;
|
||||
recorder_out["percentage"] = radial_ptr->recorder_out_.percentage;
|
||||
variables["recorder_out"] = recorder_out;
|
||||
delay["alert"] = radial_ptr->delay_.alert;
|
||||
delay["danger"] = radial_ptr->delay_.danger;
|
||||
delay["active_100ms"] = radial_ptr->delay_.active_100ms;
|
||||
variables["delay"] = delay;
|
||||
latching.append(radial_ptr->alert_latching_);
|
||||
latching.append(radial_ptr->danger_latching_);
|
||||
variables["latching"] = latching;
|
||||
// measurement
|
||||
QJsonObject measurement,general,alarm;
|
||||
general["output_used"] = radial_ptr->general.output_used;
|
||||
general["engieneering_unit"] = radial_ptr->general.engineering_unit;
|
||||
general["rectifier_function"] = radial_ptr->general.rectifier_function;
|
||||
|
||||
alarm["danger_high_level"] = radial_ptr->danger_high.level;
|
||||
alarm["danger_high_hysteresis"] = radial_ptr->danger_high.hysteresis;
|
||||
alarm["danger_high_delay"] = radial_ptr->danger_high.delay;
|
||||
alarm["danger_high_enable"] = radial_ptr->danger_high.enable;
|
||||
alarm["danger_high_latch"] = radial_ptr->danger_high.latch;
|
||||
alarm["alert_high_level"] = radial_ptr->alert_high.level;
|
||||
alarm["alert_high_hysteresis"] = radial_ptr->alert_high.hysteresis;
|
||||
alarm["alert_high_delay"] = radial_ptr->alert_high.delay;
|
||||
alarm["alert_high_enable"] = radial_ptr->alert_high.enable;
|
||||
alarm["alert_high_latch"] = radial_ptr->alert_high.latch;
|
||||
alarm["danger_low_level"] = radial_ptr->danger_low.level;
|
||||
alarm["danger_low_hysteresis"] = radial_ptr->danger_low.hysteresis;
|
||||
alarm["danger_low_delay"] = radial_ptr->danger_low.delay;
|
||||
alarm["danger_low_enable"] = radial_ptr->danger_low.enable;
|
||||
alarm["danger_low_latch"] = radial_ptr->danger_low.latch;
|
||||
measurement["general"] = general;
|
||||
measurement["alarm"] = alarm;
|
||||
variables["measurement"] = measurement;
|
||||
// gap
|
||||
QJsonObject gap,gap_general,gap_alarm;
|
||||
gap_general["output_used"] = radial_ptr->gap_general.output_used;
|
||||
gap_general["engieneering_unit"] = radial_ptr->gap_general.engineering_unit;
|
||||
gap_general["rectifier_function"] = radial_ptr->gap_general.rectifier_function;
|
||||
|
||||
gap_alarm["danger_high_level"] = radial_ptr->gap_danger_high.level;
|
||||
gap_alarm["danger_high_hysteresis"] = radial_ptr->gap_danger_high.hysteresis;
|
||||
gap_alarm["danger_high_delay"] = radial_ptr->gap_danger_high.delay;
|
||||
gap_alarm["danger_high_enable"] = radial_ptr->gap_danger_high.enable;
|
||||
gap_alarm["danger_high_latch"] = radial_ptr->gap_danger_high.latch;
|
||||
gap_alarm["alert_high_level"] = radial_ptr->gap_alert_high.level;
|
||||
gap_alarm["alert_high_hysteresis"] = radial_ptr->gap_alert_high.hysteresis;
|
||||
gap_alarm["alert_high_delay"] = radial_ptr->gap_alert_high.delay;
|
||||
gap_alarm["alert_high_enable"] = radial_ptr->gap_alert_high.enable;
|
||||
gap_alarm["alert_high_latch"] = radial_ptr->gap_alert_high.latch;
|
||||
gap_alarm["danger_low_level"] = radial_ptr->gap_danger_low.level;
|
||||
gap_alarm["danger_low_hysteresis"] = radial_ptr->gap_danger_low.hysteresis;
|
||||
gap_alarm["danger_low_delay"] = radial_ptr->gap_danger_low.delay;
|
||||
gap_alarm["danger_low_enable"] = radial_ptr->gap_danger_low.enable;
|
||||
gap_alarm["danger_low_latch"] = radial_ptr->gap_danger_low.latch;
|
||||
gap["general"] = gap_general;
|
||||
gap["alarm"] = gap_alarm;
|
||||
variables["gap"] = gap;
|
||||
|
||||
|
||||
}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){
|
||||
@ -191,33 +206,33 @@ void ConfigMgr::Save(QString & file_path) {
|
||||
band_pass["checked"] = thrust_ptr->filter_[2].checked;
|
||||
filter.append(band_pass);
|
||||
variables["filter"] = filter;
|
||||
QJsonObject direct,gap;
|
||||
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;
|
||||
gap["full_scale_range"] = thrust_ptr->gap_range.full_scale_range;
|
||||
gap["custom"] = thrust_ptr->gap_range.custom;
|
||||
// gap
|
||||
QJsonObject gap,gap_general,gap_alarm;
|
||||
gap_general["output_used"] = thrust_ptr->gap_general.output_used;
|
||||
gap_general["engieneering_unit"] = thrust_ptr->gap_general.engineering_unit;
|
||||
gap_general["rectifier_function"] = thrust_ptr->gap_general.rectifier_function;
|
||||
|
||||
gap_alarm["danger_high_level"] = thrust_ptr->gap_danger_high.level;
|
||||
gap_alarm["danger_high_hysteresis"] = thrust_ptr->gap_danger_high.hysteresis;
|
||||
gap_alarm["danger_high_delay"] = thrust_ptr->gap_danger_high.delay;
|
||||
gap_alarm["danger_high_enable"] = thrust_ptr->gap_danger_high.enable;
|
||||
gap_alarm["danger_high_latch"] = thrust_ptr->gap_danger_high.latch;
|
||||
gap_alarm["alert_high_level"] = thrust_ptr->gap_alert_high.level;
|
||||
gap_alarm["alert_high_hysteresis"] = thrust_ptr->gap_alert_high.hysteresis;
|
||||
gap_alarm["alert_high_delay"] = thrust_ptr->gap_alert_high.delay;
|
||||
gap_alarm["alert_high_enable"] = thrust_ptr->gap_alert_high.enable;
|
||||
gap_alarm["alert_high_latch"] = thrust_ptr->gap_alert_high.latch;
|
||||
gap_alarm["danger_low_level"] = thrust_ptr->gap_danger_low.level;
|
||||
gap_alarm["danger_low_hysteresis"] = thrust_ptr->gap_danger_low.hysteresis;
|
||||
gap_alarm["danger_low_delay"] = thrust_ptr->gap_danger_low.delay;
|
||||
gap_alarm["danger_low_enable"] = thrust_ptr->gap_danger_low.enable;
|
||||
gap_alarm["danger_low_latch"] = thrust_ptr->gap_danger_low.latch;
|
||||
gap["general"] = gap_general;
|
||||
gap["alarm"] = gap_alarm;
|
||||
variables["gap"] = gap;
|
||||
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["zero_position"] = thrust_ptr->zero_position.value;
|
||||
variables["negation"] = thrust_ptr->zero_position.negation;
|
||||
variables["latching"] = latching;
|
||||
variables["zero_position"] = thrust_ptr->zero_position.value;
|
||||
|
||||
}else if(ptr->base_config_[cid].channel_type == kVibPressurePulsation){
|
||||
std::shared_ptr<PressurePulsationVariable> pressure_ptr = std::dynamic_pointer_cast<PressurePulsationVariable>(base_channel_ptr);
|
||||
if(pressure_ptr == nullptr){
|
||||
@ -254,7 +269,17 @@ void ConfigMgr::Save(QString & file_path) {
|
||||
variables["sampling"] = sampling;
|
||||
variables["scaling"] = scaling;
|
||||
|
||||
} else {
|
||||
QJsonArray freband_output_array;
|
||||
QJsonObject freband_output;
|
||||
for (int var = 0; var < 10; ++var) {
|
||||
freband_output["enable"] = pressure_ptr->freband_output[var].enable;
|
||||
freband_output["start"] = pressure_ptr->freband_output[var].start;
|
||||
freband_output["end"] = pressure_ptr->freband_output[var].end;
|
||||
freband_output_array.append(freband_output);
|
||||
}
|
||||
variables["freband_output"] = freband_output_array;
|
||||
|
||||
} else if(ptr->base_config_[cid].channel_type == kVibAcc){
|
||||
std::shared_ptr<AccVelVariable> av_ptr = std::dynamic_pointer_cast<AccVelVariable>(base_channel_ptr);
|
||||
if(av_ptr == nullptr){
|
||||
continue;
|
||||
@ -277,46 +302,40 @@ void ConfigMgr::Save(QString & file_path) {
|
||||
band_pass["checked"] = av_ptr->filter_[2].checked;
|
||||
filter.append(band_pass);
|
||||
variables["filter"] = filter;
|
||||
QJsonObject direct;
|
||||
QJsonObject x1;
|
||||
QJsonObject x2;
|
||||
QJsonObject recorder_out;
|
||||
QJsonObject delay;
|
||||
QJsonArray latching;
|
||||
direct["full_scale_range"] = av_ptr->direct_.full_scale_range;
|
||||
direct["clamp_value"] = av_ptr->direct_.clamp_value;
|
||||
direct["custom"] = av_ptr->direct_.custom;
|
||||
variables["direct"] = direct;
|
||||
x1["checked"] = av_ptr->x1_.checked;
|
||||
x1["full_scale_range"] = av_ptr->x1_.full_scale_range;
|
||||
x1["clamp_value"] = av_ptr->x1_.clamp_value;
|
||||
x1["custom"] = av_ptr->x1_.custom;
|
||||
x1["phase_lag"] = av_ptr->x1_.phase_lag;
|
||||
variables["x1"] = x1;
|
||||
x2["checked"] = av_ptr->x2_.checked;
|
||||
x2["full_scale_range"] = av_ptr->x2_.full_scale_range;
|
||||
x2["clamp_value"] = av_ptr->x2_.clamp_value;
|
||||
x2["custom"] = av_ptr->x2_.custom;
|
||||
x2["phase_lag"] = av_ptr->x2_.phase_lag;
|
||||
variables["x2"] = x2;
|
||||
QJsonObject rms_integrate;
|
||||
rms_integrate["rms_active"] = av_ptr->rms_active_;
|
||||
rms_integrate["integrate_active"] = av_ptr->integrate_active_;
|
||||
variables["rms_integrate"] = rms_integrate;
|
||||
recorder_out["recorder_output"] = av_ptr->recorder_out_.recorder_output;
|
||||
recorder_out["two_ma_clamp"] = av_ptr->recorder_out_.two_ma_clamp;
|
||||
recorder_out["trip_multiply"] = av_ptr->recorder_out_.trip_multiply;
|
||||
recorder_out["comparision"] = av_ptr->recorder_out_.comparision;
|
||||
recorder_out["percentage"] = av_ptr->recorder_out_.percentage;
|
||||
variables["recorder_out"] = recorder_out;
|
||||
delay["alert"] = av_ptr->delay_.alert;
|
||||
delay["danger"] = av_ptr->delay_.danger;
|
||||
delay["active_100ms"] = av_ptr->delay_.active_100ms;
|
||||
variables["delay"] = delay;
|
||||
latching.append(av_ptr->alert_latching_);
|
||||
latching.append(av_ptr->danger_latching_);
|
||||
latching.append(av_ptr->timed_ok_);
|
||||
variables["latching"] = latching;
|
||||
// processed output
|
||||
QJsonObject processed_output,general,alarm;
|
||||
general["output_used"] = av_ptr->general.output_used;
|
||||
general["engieneering_unit"] = av_ptr->general.engineering_unit;
|
||||
general["rectifier_function"] = av_ptr->general.rectifier_function;
|
||||
|
||||
alarm["danger_high_level"] = av_ptr->danger_high.level;
|
||||
alarm["danger_high_hysteresis"] = av_ptr->danger_high.hysteresis;
|
||||
alarm["danger_high_delay"] = av_ptr->danger_high.delay;
|
||||
alarm["danger_high_enable"] = av_ptr->danger_high.enable;
|
||||
alarm["danger_high_latch"] = av_ptr->danger_high.latch;
|
||||
alarm["alert_high_level"] = av_ptr->alert_high.level;
|
||||
alarm["alert_high_hysteresis"] = av_ptr->alert_high.hysteresis;
|
||||
alarm["alert_high_delay"] = av_ptr->alert_high.delay;
|
||||
alarm["alert_high_enable"] = av_ptr->alert_high.enable;
|
||||
alarm["alert_high_latch"] = av_ptr->alert_high.latch;
|
||||
alarm["danger_low_level"] = av_ptr->danger_low.level;
|
||||
alarm["danger_low_hysteresis"] = av_ptr->danger_low.hysteresis;
|
||||
alarm["danger_low_delay"] = av_ptr->danger_low.delay;
|
||||
alarm["danger_low_enable"] = av_ptr->danger_low.enable;
|
||||
alarm["danger_low_latch"] = av_ptr->danger_low.latch;
|
||||
processed_output["general"] = general;
|
||||
processed_output["alarm"] = alarm;
|
||||
variables["processed_output"] = processed_output;
|
||||
QJsonArray freband_output_array;
|
||||
QJsonObject freband_output;
|
||||
for (int var = 0; var < 10; ++var) {
|
||||
freband_output["enable"] = av_ptr->freband_output[var].enable;
|
||||
freband_output["start"] = av_ptr->freband_output[var].start;
|
||||
freband_output["end"] = av_ptr->freband_output[var].end;
|
||||
freband_output_array.append(freband_output);
|
||||
}
|
||||
variables["freband_output"] = freband_output_array;
|
||||
|
||||
}
|
||||
channel_item["variable"] = variables;
|
||||
} else if (card_type_[i] == kCardSpeedSingle || card_type_[i] == kCardSpeedTMRPrimary) {
|
||||
|
@ -66,6 +66,37 @@ void PressurePulsation::Init() {
|
||||
ui->lineEdit_measuring_value_max->setText(QString::number(variable_ptr->measuring_max));
|
||||
ui->lineEdit_scale_value_min->setText(QString::number(variable_ptr->scale_min));
|
||||
ui->lineEdit_scale_value_max->setText(QString::number(variable_ptr->scale_max));
|
||||
|
||||
ui->checkBox_enable->setChecked(variable_ptr->freband_output[0].enable);
|
||||
ui->lineEdit_start->setText(QString::number(variable_ptr->freband_output[0].start));
|
||||
ui->lineEdit_end->setText(QString::number(variable_ptr->freband_output[0].end));
|
||||
ui->checkBox_enable_2->setChecked(variable_ptr->freband_output[1].enable);
|
||||
ui->lineEdit_start_2->setText(QString::number(variable_ptr->freband_output[1].start));
|
||||
ui->lineEdit_end_2->setText(QString::number(variable_ptr->freband_output[1].end));
|
||||
ui->checkBox_enable_3->setChecked(variable_ptr->freband_output[2].enable);
|
||||
ui->lineEdit_start_3->setText(QString::number(variable_ptr->freband_output[2].start));
|
||||
ui->lineEdit_end_3->setText(QString::number(variable_ptr->freband_output[2].end));
|
||||
ui->checkBox_enable_4->setChecked(variable_ptr->freband_output[3].enable);
|
||||
ui->lineEdit_start_4->setText(QString::number(variable_ptr->freband_output[3].start));
|
||||
ui->lineEdit_end_4->setText(QString::number(variable_ptr->freband_output[3].end));
|
||||
ui->checkBox_enable_5->setChecked(variable_ptr->freband_output[4].enable);
|
||||
ui->lineEdit_start_5->setText(QString::number(variable_ptr->freband_output[4].start));
|
||||
ui->lineEdit_end_5->setText(QString::number(variable_ptr->freband_output[4].end));
|
||||
ui->checkBox_enable_6->setChecked(variable_ptr->freband_output[5].enable);
|
||||
ui->lineEdit_start_6->setText(QString::number(variable_ptr->freband_output[5].start));
|
||||
ui->lineEdit_end_6->setText(QString::number(variable_ptr->freband_output[5].end));
|
||||
ui->checkBox_enable_7->setChecked(variable_ptr->freband_output[6].enable);
|
||||
ui->lineEdit_start_7->setText(QString::number(variable_ptr->freband_output[6].start));
|
||||
ui->lineEdit_end_7->setText(QString::number(variable_ptr->freband_output[6].end));
|
||||
ui->checkBox_enable_8->setChecked(variable_ptr->freband_output[7].enable);
|
||||
ui->lineEdit_start_8->setText(QString::number(variable_ptr->freband_output[7].start));
|
||||
ui->lineEdit_end_8->setText(QString::number(variable_ptr->freband_output[7].end));
|
||||
ui->checkBox_enable_9->setChecked(variable_ptr->freband_output[8].enable);
|
||||
ui->lineEdit_start_9->setText(QString::number(variable_ptr->freband_output[8].start));
|
||||
ui->lineEdit_end_9->setText(QString::number(variable_ptr->freband_output[8].end));
|
||||
ui->checkBox_enable_10->setChecked(variable_ptr->freband_output[9].enable);
|
||||
ui->lineEdit_start_10->setText(QString::number(variable_ptr->freband_output[9].start));
|
||||
ui->lineEdit_end_10->setText(QString::number(variable_ptr->freband_output[9].end));
|
||||
}
|
||||
void PressurePulsation::on_pushButton_confirm_clicked()
|
||||
{
|
||||
@ -103,6 +134,37 @@ void PressurePulsation::on_pushButton_confirm_clicked()
|
||||
variable->measuring_max = ui->lineEdit_measuring_value_max->text().toInt();
|
||||
variable->scale_min = ui->lineEdit_scale_value_min->text().toInt();
|
||||
variable->scale_max = ui->lineEdit_scale_value_max->text().toInt();
|
||||
// -freband output
|
||||
variable->freband_output[0].enable = ui->checkBox_enable->isChecked();
|
||||
variable->freband_output[0].start = ui->lineEdit_start->text().toDouble();
|
||||
variable->freband_output[0].end = ui->lineEdit_end->text().toDouble();
|
||||
variable->freband_output[1].enable = ui->checkBox_enable_2->isChecked();
|
||||
variable->freband_output[1].start = ui->lineEdit_start_2->text().toDouble();
|
||||
variable->freband_output[1].end = ui->lineEdit_end_2->text().toDouble();
|
||||
variable->freband_output[2].enable = ui->checkBox_enable_3->isChecked();
|
||||
variable->freband_output[2].start = ui->lineEdit_start_3->text().toDouble();
|
||||
variable->freband_output[2].end = ui->lineEdit_end_3->text().toDouble();
|
||||
variable->freband_output[3].enable = ui->checkBox_enable_4->isChecked();
|
||||
variable->freband_output[3].start = ui->lineEdit_start_4->text().toDouble();
|
||||
variable->freband_output[3].end = ui->lineEdit_end_4->text().toDouble();
|
||||
variable->freband_output[4].enable = ui->checkBox_enable_5->isChecked();
|
||||
variable->freband_output[4].start = ui->lineEdit_start_5->text().toDouble();
|
||||
variable->freband_output[4].end = ui->lineEdit_end_5->text().toDouble();
|
||||
variable->freband_output[5].enable = ui->checkBox_enable_6->isChecked();
|
||||
variable->freband_output[5].start = ui->lineEdit_start_6->text().toDouble();
|
||||
variable->freband_output[5].end = ui->lineEdit_end_6->text().toDouble();
|
||||
variable->freband_output[6].enable = ui->checkBox_enable_7->isChecked();
|
||||
variable->freband_output[6].start = ui->lineEdit_start_7->text().toDouble();
|
||||
variable->freband_output[6].end = ui->lineEdit_end_7->text().toDouble();
|
||||
variable->freband_output[7].enable = ui->checkBox_enable_8->isChecked();
|
||||
variable->freband_output[7].start = ui->lineEdit_start_8->text().toDouble();
|
||||
variable->freband_output[7].end = ui->lineEdit_end_8->text().toDouble();
|
||||
variable->freband_output[8].enable = ui->checkBox_enable_9->isChecked();
|
||||
variable->freband_output[8].start = ui->lineEdit_start_9->text().toDouble();
|
||||
variable->freband_output[8].end = ui->lineEdit_end_9->text().toDouble();
|
||||
variable->freband_output[9].enable = ui->checkBox_enable_10->isChecked();
|
||||
variable->freband_output[9].start = ui->lineEdit_start_10->text().toDouble();
|
||||
variable->freband_output[9].end = ui->lineEdit_end_10->text().toDouble();
|
||||
|
||||
ptr->variables_.push_back(variable);
|
||||
this->close();
|
||||
@ -127,6 +189,38 @@ void PressurePulsation::on_pushButton_confirm_clicked()
|
||||
variable->scale_min = ui->lineEdit_scale_value_min->text().toInt();
|
||||
variable->scale_max = ui->lineEdit_scale_value_max->text().toInt();
|
||||
|
||||
// -freband output
|
||||
variable->freband_output[0].enable = ui->checkBox_enable->isChecked();
|
||||
variable->freband_output[0].start = ui->lineEdit_start->text().toDouble();
|
||||
variable->freband_output[0].end = ui->lineEdit_end->text().toDouble();
|
||||
variable->freband_output[1].enable = ui->checkBox_enable_2->isChecked();
|
||||
variable->freband_output[1].start = ui->lineEdit_start_2->text().toDouble();
|
||||
variable->freband_output[1].end = ui->lineEdit_end_2->text().toDouble();
|
||||
variable->freband_output[2].enable = ui->checkBox_enable_3->isChecked();
|
||||
variable->freband_output[2].start = ui->lineEdit_start_3->text().toDouble();
|
||||
variable->freband_output[2].end = ui->lineEdit_end_3->text().toDouble();
|
||||
variable->freband_output[3].enable = ui->checkBox_enable_4->isChecked();
|
||||
variable->freband_output[3].start = ui->lineEdit_start_4->text().toDouble();
|
||||
variable->freband_output[3].end = ui->lineEdit_end_4->text().toDouble();
|
||||
variable->freband_output[4].enable = ui->checkBox_enable_5->isChecked();
|
||||
variable->freband_output[4].start = ui->lineEdit_start_5->text().toDouble();
|
||||
variable->freband_output[4].end = ui->lineEdit_end_5->text().toDouble();
|
||||
variable->freband_output[5].enable = ui->checkBox_enable_6->isChecked();
|
||||
variable->freband_output[5].start = ui->lineEdit_start_6->text().toDouble();
|
||||
variable->freband_output[5].end = ui->lineEdit_end_6->text().toDouble();
|
||||
variable->freband_output[6].enable = ui->checkBox_enable_7->isChecked();
|
||||
variable->freband_output[6].start = ui->lineEdit_start_7->text().toDouble();
|
||||
variable->freband_output[6].end = ui->lineEdit_end_7->text().toDouble();
|
||||
variable->freband_output[7].enable = ui->checkBox_enable_8->isChecked();
|
||||
variable->freband_output[7].start = ui->lineEdit_start_8->text().toDouble();
|
||||
variable->freband_output[7].end = ui->lineEdit_end_8->text().toDouble();
|
||||
variable->freband_output[8].enable = ui->checkBox_enable_9->isChecked();
|
||||
variable->freband_output[8].start = ui->lineEdit_start_9->text().toDouble();
|
||||
variable->freband_output[8].end = ui->lineEdit_end_9->text().toDouble();
|
||||
variable->freband_output[9].enable = ui->checkBox_enable_10->isChecked();
|
||||
variable->freband_output[9].start = ui->lineEdit_start_10->text().toDouble();
|
||||
variable->freband_output[9].end = ui->lineEdit_end_10->text().toDouble();
|
||||
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>701</width>
|
||||
<height>519</height>
|
||||
<height>572</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -76,7 +76,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>450</y>
|
||||
<y>500</y>
|
||||
<width>632</width>
|
||||
<height>37</height>
|
||||
</rect>
|
||||
@ -164,11 +164,11 @@
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>651</width>
|
||||
<height>381</height>
|
||||
<height>421</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
@ -514,8 +514,8 @@
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<width>118</width>
|
||||
<height>22</height>
|
||||
<width>121</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
@ -543,7 +543,7 @@
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>122</width>
|
||||
<height>14</height>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
@ -569,7 +569,7 @@
|
||||
<x>20</x>
|
||||
<y>130</y>
|
||||
<width>92</width>
|
||||
<height>14</height>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
@ -594,8 +594,8 @@
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>160</y>
|
||||
<width>104</width>
|
||||
<height>14</height>
|
||||
<width>106</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
@ -774,6 +774,367 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>分频段选择</string>
|
||||
</attribute>
|
||||
<widget class="QCheckBox" name="checkBox_enable_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>230</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>80</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>170</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>110</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>140</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>170</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>140</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>200</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>40</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>频率开始(Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>230</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>80</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>140</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>200</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>200</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>110</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>40</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>频率结束(Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>230</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>110</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>80</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>170</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>350</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>320</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>290</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>350</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>320</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>260</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>260</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>290</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>290</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>260</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>320</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>350</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
@ -70,7 +70,67 @@ void Radial::Init() {
|
||||
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);
|
||||
// processed output
|
||||
// -general
|
||||
if(variable_ptr->general.output_used)
|
||||
ui->comboBox_output_used->setCurrentIndex(0);
|
||||
else
|
||||
ui->comboBox_output_used->setCurrentIndex(1);
|
||||
// -alarm
|
||||
ui->lineEdit_danger_high_level->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->lineEdit_danger_high_hysteresis->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->lineEdit_danger_high_delay->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->checkBox_danger_high_enable->setChecked(variable_ptr->danger_high.enable);
|
||||
ui->checkBox_danger_high_latch->setChecked(variable_ptr->danger_high.latch);
|
||||
|
||||
ui->lineEdit_alert_high_level->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->lineEdit_alert_high_hysteresis->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->lineEdit_alert_high_delay->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->checkBox_alert_high_enable->setChecked(variable_ptr->alert_high.enable);
|
||||
ui->checkBox_alert_high_latch->setChecked(variable_ptr->alert_high.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
|
||||
ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
|
||||
ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
|
||||
|
||||
// Gap
|
||||
// -general
|
||||
if(variable_ptr->gap_general.output_used)
|
||||
ui->comboBox_output_used_2->setCurrentIndex(0);
|
||||
else
|
||||
ui->comboBox_output_used_2->setCurrentIndex(1);
|
||||
// -alarm
|
||||
ui->lineEdit_danger_high_level_2->setText(QString::number(variable_ptr->gap_danger_high.level));
|
||||
ui->lineEdit_danger_high_hysteresis_2->setText(QString::number(variable_ptr->gap_danger_high.level));
|
||||
ui->lineEdit_danger_high_delay_2->setText(QString::number(variable_ptr->gap_danger_high.level));
|
||||
ui->checkBox_danger_high_enable_2->setChecked(variable_ptr->gap_danger_high.enable);
|
||||
ui->checkBox_danger_high_latch_2->setChecked(variable_ptr->gap_danger_high.latch);
|
||||
|
||||
ui->lineEdit_alert_high_level_2->setText(QString::number(variable_ptr->gap_alert_high.level));
|
||||
ui->lineEdit_alert_high_hysteresis_2->setText(QString::number(variable_ptr->gap_alert_high.level));
|
||||
ui->lineEdit_alert_high_delay_2->setText(QString::number(variable_ptr->gap_alert_high.level));
|
||||
ui->checkBox_alert_high_enable_2->setChecked(variable_ptr->gap_alert_high.enable);
|
||||
ui->checkBox_alert_high_latch_2->setChecked(variable_ptr->gap_alert_high.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level_2->setText(QString::number(variable_ptr->gap_danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis_2->setText(QString::number(variable_ptr->gap_danger_low.level));
|
||||
ui->lineEdit_danger_low_delay_2->setText(QString::number(variable_ptr->gap_danger_low.level));
|
||||
ui->checkBox_danger_low_enable_2->setChecked(variable_ptr->gap_danger_low.enable);
|
||||
ui->checkBox_danger_low_latch_2->setChecked(variable_ptr->gap_danger_low.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level_2->setText(QString::number(variable_ptr->gap_danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis_2->setText(QString::number(variable_ptr->gap_danger_low.level));
|
||||
ui->lineEdit_danger_low_delay_2->setText(QString::number(variable_ptr->gap_danger_low.level));
|
||||
ui->checkBox_danger_low_enable_2->setChecked(variable_ptr->gap_danger_low.enable);
|
||||
ui->checkBox_danger_low_latch_2->setChecked(variable_ptr->gap_danger_low.latch);
|
||||
}
|
||||
|
||||
void Radial::on_pushButton_confirm_clicked() {
|
||||
@ -100,7 +160,51 @@ void Radial::on_pushButton_confirm_clicked() {
|
||||
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();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
// Gap
|
||||
// -general
|
||||
if(ui->comboBox_output_used_2->currentIndex() == 0)
|
||||
variable->gap_general.output_used = true;
|
||||
else
|
||||
variable->gap_general.output_used = false;
|
||||
// -alarm
|
||||
variable->gap_danger_high.level = ui->lineEdit_danger_high_level_2->text().toDouble();
|
||||
variable->gap_danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis_2->text().toDouble();
|
||||
variable->gap_danger_high.delay = ui->lineEdit_danger_high_delay_2->text().toDouble();
|
||||
variable->gap_danger_high.enable = ui->checkBox_danger_high_enable_2->isChecked();
|
||||
variable->gap_danger_high.latch = ui->checkBox_danger_high_latch_2->isChecked();
|
||||
variable->gap_alert_high.level = ui->lineEdit_alert_high_level_2->text().toDouble();
|
||||
variable->gap_alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis_2->text().toDouble();
|
||||
variable->gap_alert_high.delay = ui->lineEdit_alert_high_delay_2->text().toDouble();
|
||||
variable->gap_alert_high.enable = ui->checkBox_alert_high_enable_2->isChecked();
|
||||
variable->gap_alert_high.latch = ui->checkBox_alert_high_latch_2->isChecked();
|
||||
variable->gap_danger_low.level = ui->lineEdit_danger_low_level_2->text().toDouble();
|
||||
variable->gap_danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
|
||||
variable->gap_danger_low.delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
|
||||
variable->gap_danger_low.enable = ui->checkBox_danger_low_enable_2->isChecked();
|
||||
variable->gap_danger_low.latch = ui->checkBox_danger_low_latch_2->isChecked();
|
||||
// add to ptr
|
||||
ptr->variables_.push_back(variable);
|
||||
this->close();
|
||||
return;
|
||||
@ -115,7 +219,50 @@ void Radial::on_pushButton_confirm_clicked() {
|
||||
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();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
// Gap
|
||||
// -general
|
||||
if(ui->comboBox_output_used_2->currentIndex() == 0)
|
||||
variable->gap_general.output_used = true;
|
||||
else
|
||||
variable->gap_general.output_used = false;
|
||||
// -alarm
|
||||
variable->gap_danger_high.level = ui->lineEdit_danger_high_level_2->text().toDouble();
|
||||
variable->gap_danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis_2->text().toDouble();
|
||||
variable->gap_danger_high.delay = ui->lineEdit_danger_high_delay_2->text().toDouble();
|
||||
variable->gap_danger_high.enable = ui->checkBox_danger_high_enable_2->isChecked();
|
||||
variable->gap_danger_high.latch = ui->checkBox_danger_high_latch_2->isChecked();
|
||||
variable->gap_alert_high.level = ui->lineEdit_alert_high_level_2->text().toDouble();
|
||||
variable->gap_alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis_2->text().toDouble();
|
||||
variable->gap_alert_high.delay = ui->lineEdit_alert_high_delay_2->text().toDouble();
|
||||
variable->gap_alert_high.enable = ui->checkBox_alert_high_enable_2->isChecked();
|
||||
variable->gap_alert_high.latch = ui->checkBox_alert_high_latch_2->isChecked();
|
||||
variable->gap_danger_low.level = ui->lineEdit_danger_low_level_2->text().toDouble();
|
||||
variable->gap_danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
|
||||
variable->gap_danger_low.delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
|
||||
variable->gap_danger_low.enable = ui->checkBox_danger_low_enable_2->isChecked();
|
||||
variable->gap_danger_low.latch = ui->checkBox_danger_low_latch_2->isChecked();
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
@ -293,14 +293,14 @@
|
||||
<widget class="QTabWidget" name="tabWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>621</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_8">
|
||||
<attribute name="title">
|
||||
@ -566,7 +566,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hystersis">
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hysteresis">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
@ -676,7 +676,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_enable">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -689,7 +689,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -702,7 +702,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable_2">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -728,7 +728,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -741,7 +741,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_ltach">
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -754,7 +754,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_latch">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -767,7 +767,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch_2">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -797,7 +797,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_10">
|
||||
<attribute name="title">
|
||||
@ -1063,7 +1063,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hystersis_2">
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hysteresis_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
@ -1173,7 +1173,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_enable_2">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_enable_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -1186,7 +1186,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable_3">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_enable_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -1199,7 +1199,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable_4">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_enable_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -1225,7 +1225,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch_3">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_latch_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -1238,7 +1238,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_ltach_2">
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_latch_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -1251,7 +1251,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_latch_2">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_latch_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -1264,7 +1264,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch_4">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_latch_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
|
77
trust.cpp
77
trust.cpp
@ -62,6 +62,37 @@ void Trust::Init() {
|
||||
|
||||
ui->doubleSpinBox_zero_position->setValue(variable_ptr->zero_position.value);
|
||||
ui->checkBox_negation->setChecked(variable_ptr->zero_position.negation);
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(variable_ptr->general.output_used)
|
||||
ui->comboBox_output_used->setCurrentIndex(0);
|
||||
else
|
||||
ui->comboBox_output_used->setCurrentIndex(1);
|
||||
// -alarm
|
||||
ui->lineEdit_danger_high_level->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->lineEdit_danger_high_hysteresis->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->lineEdit_danger_high_delay->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->checkBox_danger_high_enable->setChecked(variable_ptr->danger_high.enable);
|
||||
ui->checkBox_danger_high_latch->setChecked(variable_ptr->danger_high.latch);
|
||||
|
||||
ui->lineEdit_alert_high_level->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->lineEdit_alert_high_hysteresis->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->lineEdit_alert_high_delay->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->checkBox_alert_high_enable->setChecked(variable_ptr->alert_high.enable);
|
||||
ui->checkBox_alert_high_latch->setChecked(variable_ptr->alert_high.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
|
||||
ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
|
||||
ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
|
||||
}
|
||||
void Trust::on_pushButton_confirm_clicked()
|
||||
{
|
||||
@ -94,6 +125,29 @@ void Trust::on_pushButton_confirm_clicked()
|
||||
|
||||
variable->zero_position.value = ui->doubleSpinBox_zero_position->value();
|
||||
variable->zero_position.negation = ui->checkBox_negation->isChecked();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
ptr->variables_.push_back(variable);
|
||||
this->close();
|
||||
return;
|
||||
@ -111,6 +165,29 @@ void Trust::on_pushButton_confirm_clicked()
|
||||
|
||||
variable->zero_position.value = ui->doubleSpinBox_zero_position->value();
|
||||
variable->zero_position.negation = ui->checkBox_negation->isChecked();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
385
trust.ui
385
trust.ui
@ -281,13 +281,13 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<y>30</y>
|
||||
<width>621</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_8">
|
||||
<attribute name="title">
|
||||
@ -430,7 +430,7 @@
|
||||
<property name="title">
|
||||
<string>初始位置</string>
|
||||
</property>
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_zero_position_2">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_zero_position">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
@ -462,7 +462,7 @@
|
||||
<string>-50 - 50 V</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_negation_2">
|
||||
<widget class="QCheckBox" name="checkBox_negation">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
@ -611,7 +611,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hystersis">
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hysteresis">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
@ -721,7 +721,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_enable">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -734,7 +734,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -747,7 +747,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable_2">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -773,7 +773,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -786,7 +786,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_ltach">
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -799,7 +799,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_latch">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -812,7 +812,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch_2">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -828,367 +828,6 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_6">
|
||||
<attribute name="title">
|
||||
<string>分频段选择</string>
|
||||
</attribute>
|
||||
<widget class="QLineEdit" name="lineEdit_start_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>210</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>270</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>300</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>频率开始(Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>300</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>240</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>330</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>60</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>270</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>270</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>60</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>150</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>120</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>150</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>频率结束(Hz)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>180</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>330</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>120</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>210</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>120</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>180</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>150</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>240</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>300</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>90</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>240</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_start_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>90</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>180</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_enable_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>210</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使能</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_end_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>330</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
|
95
velocity.cpp
95
velocity.cpp
@ -32,28 +32,10 @@ Velocity::~Velocity() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Velocity::on_checkBox_rms_toggled(bool checked) {
|
||||
// TODO: 自定义的回调
|
||||
|
||||
}
|
||||
|
||||
void Velocity::on_checkBox_integrate_toggled(bool checked) {
|
||||
// TODO: 自定义的回调
|
||||
|
||||
}
|
||||
|
||||
void Velocity::on_pushButton_cancel_clicked() {
|
||||
this->close();
|
||||
}
|
||||
|
||||
void Velocity::on_checkBox_1x_ampl_toggled(bool checked) {
|
||||
|
||||
}
|
||||
|
||||
void Velocity::on_checkBox_2x_ampl_toggled(bool checked) {
|
||||
|
||||
}
|
||||
|
||||
void Velocity::Init() {
|
||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no);
|
||||
if (base_ptr == nullptr) {
|
||||
@ -81,6 +63,37 @@ void Velocity::Init() {
|
||||
ui->spinBox_band_pass_low->setValue(variable_ptr->filter_[2].low);
|
||||
ui->spinBox_band_pass_high->setValue(variable_ptr->filter_[2].high);
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(variable_ptr->general.output_used)
|
||||
ui->comboBox_output_used->setCurrentIndex(0);
|
||||
else
|
||||
ui->comboBox_output_used->setCurrentIndex(1);
|
||||
// -alarm
|
||||
ui->lineEdit_danger_high_level->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->lineEdit_danger_high_hysteresis->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->lineEdit_danger_high_delay->setText(QString::number(variable_ptr->danger_high.level));
|
||||
ui->checkBox_danger_high_enable->setChecked(variable_ptr->danger_high.enable);
|
||||
ui->checkBox_danger_high_latch->setChecked(variable_ptr->danger_high.latch);
|
||||
|
||||
ui->lineEdit_alert_high_level->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->lineEdit_alert_high_hysteresis->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->lineEdit_alert_high_delay->setText(QString::number(variable_ptr->alert_high.level));
|
||||
ui->checkBox_alert_high_enable->setChecked(variable_ptr->alert_high.enable);
|
||||
ui->checkBox_alert_high_latch->setChecked(variable_ptr->alert_high.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
|
||||
ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
|
||||
|
||||
ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.level));
|
||||
ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
|
||||
ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
|
||||
|
||||
}
|
||||
|
||||
void Velocity::on_pushButton_confirm_clicked() {
|
||||
@ -110,7 +123,28 @@ void Velocity::on_pushButton_confirm_clicked() {
|
||||
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();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
ptr->variables_.push_back(variable);
|
||||
this->close();
|
||||
return;
|
||||
@ -125,6 +159,27 @@ void Velocity::on_pushButton_confirm_clicked() {
|
||||
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();
|
||||
|
||||
// processed output
|
||||
// -general
|
||||
if(ui->comboBox_output_used->currentIndex() == 0)
|
||||
variable->general.output_used = true;
|
||||
else
|
||||
variable->general.output_used = false;
|
||||
// -alarm
|
||||
variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
|
||||
variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
|
||||
variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
|
||||
variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
|
||||
variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
|
||||
variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
|
||||
variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
|
||||
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
|
||||
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
|
||||
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
|
||||
variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
|
||||
variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
|
||||
variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
|
||||
variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
|
||||
variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
|
||||
this->close();
|
||||
}
|
||||
|
@ -20,10 +20,6 @@ class Velocity : public QWidget {
|
||||
private slots:
|
||||
void on_pushButton_confirm_clicked();
|
||||
void on_pushButton_cancel_clicked();
|
||||
void on_checkBox_1x_ampl_toggled(bool checked);
|
||||
void on_checkBox_2x_ampl_toggled(bool checked);
|
||||
void on_checkBox_rms_toggled(bool checked);
|
||||
void on_checkBox_integrate_toggled(bool checked);
|
||||
|
||||
private:
|
||||
Ui::Velocity *ui;
|
||||
|
22
velocity.ui
22
velocity.ui
@ -293,14 +293,14 @@
|
||||
<widget class="QTabWidget" name="tabWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>621</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_8">
|
||||
<attribute name="title">
|
||||
@ -566,7 +566,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hystersis">
|
||||
<widget class="QLineEdit" name="lineEdit_danger_high_hysteresis">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
@ -676,7 +676,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_enable">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -689,7 +689,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -702,7 +702,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_enable_2">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
@ -728,7 +728,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch">
|
||||
<widget class="QCheckBox" name="checkBox_alert_high_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -741,7 +741,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_ltach">
|
||||
<widget class="QCheckBox" name="checkBox_danger_low_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -754,7 +754,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_danger_latch">
|
||||
<widget class="QCheckBox" name="checkBox_danger_high_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
@ -767,7 +767,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_alert_latch_2">
|
||||
<widget class="QCheckBox" name="checkBox_alert_low_latch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
|
Loading…
x
Reference in New Issue
Block a user