|
|
@ -17,6 +17,9 @@ MainWindow::MainWindow(QWidget *parent) |
|
|
|
_healStatus = new HealthStatus; |
|
|
|
_rxBfPrp = new RxBeamformerProperties; |
|
|
|
_bCtrl = new BoardsCtrlMngt (_usd->device); |
|
|
|
|
|
|
|
_supRbValue = new SupervisorRbValue; |
|
|
|
_faultStatus = new MpsFaultStatus; |
|
|
|
// _dial = new WaitDialog();
|
|
|
|
// _dial->setModal(true);
|
|
|
|
|
|
|
@ -76,19 +79,19 @@ MainWindow::MainWindow(QWidget *parent) |
|
|
|
// ui->btn_txDacStartStop->setText(START);
|
|
|
|
// ui->btn_txDacOnOff->setText(ON);
|
|
|
|
// ui->btn_HVOnOff->setText(HV_ON);
|
|
|
|
ui->btn_motorOnOff->setText(MOTOR_ON); |
|
|
|
ui->btn_pwr1OnOff->setText(PWR1_ON); |
|
|
|
ui->btn_pwr2OnOff->setText(PWR2_ON); |
|
|
|
ui->btn_pwr3OnOff->setText(PWR3_ON); |
|
|
|
ui->btn_pwr4OnOff->setText(PWR4_ON); |
|
|
|
// ui->btn_motorOnOff->setText(MOTOR_ON);
|
|
|
|
// ui->btn_pwr1OnOff->setText(PWR1_ON);
|
|
|
|
// ui->btn_pwr2OnOff->setText(PWR2_ON);
|
|
|
|
// ui->btn_pwr3OnOff->setText(PWR3_ON);
|
|
|
|
// ui->btn_pwr4OnOff->setText(PWR4_ON);
|
|
|
|
ui->btn_pllClkSt->setText(ON); |
|
|
|
ui->btn_pllClkTps->setText(ON); |
|
|
|
//ui->btn_mulDacTrig->setText(TRIG_ON);
|
|
|
|
ui->btn_thsdStateUpdate->setText(THSD_State_Update); |
|
|
|
ui->btn_pwrDacsEnable->setText(VALID); |
|
|
|
// ui->btn_pwrDacsEnable->setText(VALID);
|
|
|
|
ui->btn_hvRegulatorConfig->setText(ENABLE); |
|
|
|
ui->btn_pm5RegulatorConfig->setText(ENABLE); |
|
|
|
ui->btn_DacsOnOff->setText(DACS_ENABLE); |
|
|
|
// ui->btn_DacsOnOff->setText(DACS_ENABLE);
|
|
|
|
ui->btn_updateRdbackValue->setText(UPDATE); |
|
|
|
// ui->btn_dmaStart_2->setText(START);
|
|
|
|
// ui->btn_dmaStop_2->setVisible(false);
|
|
|
@ -1143,6 +1146,43 @@ void MainWindow::newMessage(QString message) |
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
void MainWindow::on_btn_scenStart_clicked() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
auto startIndex = ui->tb_startIdx->text().toUInt(Q_NULLPTR, 16); |
|
|
|
if(startIndex == 0 && ui->tb_startIdx->text() != "0") |
|
|
|
{ |
|
|
|
MESSAGE_BOX("Invalid input format for start index"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
auto endIndex = ui->tb_endIdx->text().toUInt(Q_NULLPTR, 16); |
|
|
|
if(endIndex == 0 && ui->tb_endIdx->text() != "0") |
|
|
|
{ |
|
|
|
MESSAGE_BOX("Invalid input format for stop index"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
auto str = ui->btn_scenStart->text(); |
|
|
|
if(str == "Scenario Start") |
|
|
|
{ |
|
|
|
_trx.setScenPlayerIndex(startIndex, endIndex); |
|
|
|
_trx.scenPlayerStart(); |
|
|
|
ui->btn_scenStart->setText("Scenario Stop"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_trx.scenPlayerStop(); |
|
|
|
ui->btn_scenStart->setText("Scenario Start"); |
|
|
|
} |
|
|
|
} |
|
|
|
catch(SonoException& e) |
|
|
|
{ |
|
|
|
qDebug(e.what()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
///*************************************************************************************************/
|
|
|
|
//void MainWindow::on_btn_scenarioPauseResume_clicked()
|
|
|
|
//{
|
|
|
@ -1169,6 +1209,7 @@ void MainWindow::newMessage(QString message) |
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
///*************************************************************************************************/
|
|
|
|
//void MainWindow::on_btn_txDacBrowse_clicked()
|
|
|
|
//{
|
|
|
@ -1865,8 +1906,6 @@ const QString MainWindow::enum2String(ePg state) const |
|
|
|
//// pwr.setDAcs(true, cwdValue, hvbValue, hvaValue);
|
|
|
|
//// pwr.setDAcs(false, cwdValue, hvbValue, hvaValue);
|
|
|
|
|
|
|
|
// _trx.mpsSetAo(hvaValue, hvbValue);
|
|
|
|
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// while (i2cDone==false){
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
@ -1879,6 +1918,14 @@ const QString MainWindow::enum2String(ePg state) const |
|
|
|
//// ui->tb_cwdDacValue->setText(QString::number(real_CWdValue, 'f', 2));
|
|
|
|
//}
|
|
|
|
|
|
|
|
void MainWindow::on_btn_setAo_clicked() |
|
|
|
{ |
|
|
|
auto hvaValue=ui->tb_hvaDacValue->text().toFloat(Q_NULLPTR); |
|
|
|
auto hvbValue=ui->tb_hvbDacValue->text().toFloat(Q_NULLPTR); |
|
|
|
//auto cwdValue=ui->tb_cwdDacValue->text().toFloat(Q_NULLPTR);
|
|
|
|
_trx.mpsSetAo(hvaValue, hvbValue); |
|
|
|
} |
|
|
|
|
|
|
|
///*************************************************************************************************/
|
|
|
|
//void MainWindow::on_btn_DacsOnOff_clicked()
|
|
|
|
//{
|
|
|
@ -1923,295 +1970,293 @@ const QString MainWindow::enum2String(ePg state) const |
|
|
|
//}
|
|
|
|
|
|
|
|
///*************************************************************************************************/
|
|
|
|
//void MainWindow::on_chk_sup24v_stateChanged(int arg1)
|
|
|
|
//{
|
|
|
|
// bool i2cBusy, i2cDone;
|
|
|
|
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// while (i2cBusy==true) {
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// }
|
|
|
|
|
|
|
|
// if (ui->chk_sup24v->isChecked())
|
|
|
|
// {
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// while (i2cBusy==true) {
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// }
|
|
|
|
//// // delay (100);
|
|
|
|
|
|
|
|
// _trx.init(); // p24_On
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// while (i2cDone==false){
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// while (i2cBusy==true) {
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// }
|
|
|
|
//// // delay (100);
|
|
|
|
|
|
|
|
//// pwr.setSetupCmdP24vOnOff(false); // p24_Off
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// while (i2cDone==false){
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// }
|
|
|
|
// }
|
|
|
|
void MainWindow::on_chk_initBoards_clicked() |
|
|
|
{ |
|
|
|
// bool i2cBusy, i2cDone;
|
|
|
|
|
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// while (i2cBusy==true) {
|
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}
|
|
|
|
if (ui->chk_initBoards->isChecked()) |
|
|
|
{ |
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// while (i2cBusy==true) {
|
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// }
|
|
|
|
// // delay (100);
|
|
|
|
|
|
|
|
_trx.init(); // p24_On
|
|
|
|
// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
// while (i2cDone==false){
|
|
|
|
// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
{ |
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// while (i2cBusy==true) {
|
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// }
|
|
|
|
// // delay (100);
|
|
|
|
|
|
|
|
// pwr.setSetupCmdP24vOnOff(false); // p24_Off
|
|
|
|
// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
// while (i2cDone==false){
|
|
|
|
// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
///*************************************************************************************************/
|
|
|
|
|
|
|
|
//void MainWindow::on_btn_supJump_clicked()
|
|
|
|
//{
|
|
|
|
//// bool i2cBusy, i2cDone;
|
|
|
|
void MainWindow::on_btn_supJump_clicked() |
|
|
|
{ |
|
|
|
// bool i2cBusy, i2cDone;
|
|
|
|
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// while (i2cBusy==true) {
|
|
|
|
//// i2cBusy=pwr.getI2cBusy();
|
|
|
|
//// }
|
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// while (i2cBusy==true) {
|
|
|
|
// i2cBusy=pwr.getI2cBusy();
|
|
|
|
// }
|
|
|
|
|
|
|
|
//// pwr.setSetupCmdJmp(true); // jump
|
|
|
|
//// pwr.setSetupCmdJmp(false);
|
|
|
|
// pwr.setSetupCmdJmp(true); // jump
|
|
|
|
// pwr.setSetupCmdJmp(false);
|
|
|
|
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// while (i2cDone==false){
|
|
|
|
//// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
//// }
|
|
|
|
// _trx.mpsReset();
|
|
|
|
//}
|
|
|
|
// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
// while (i2cDone==false){
|
|
|
|
// i2cDone=pwr.getI2cCmdDone();
|
|
|
|
// }
|
|
|
|
_trx.mpsReset(); |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
void MainWindow::on_btn_updateRdbackValue_clicked() |
|
|
|
{ |
|
|
|
|
|
|
|
_trx.supervisorRbValue(supRbValue); |
|
|
|
_trx.supervisorRbValue(_supRbValue); |
|
|
|
|
|
|
|
auto hvapValue=supRbValue->hvap; |
|
|
|
auto hvapValue=_supRbValue->hvap; |
|
|
|
ui->l_hvap->setText(QString::number(hvapValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto hvbpValue=supRbValue->hvbp; |
|
|
|
auto hvbpValue=_supRbValue->hvbp; |
|
|
|
ui->l_hvbp->setText(QString::number(hvbpValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto cwdpValue=supRbValue->cwdp; |
|
|
|
auto cwdpValue=_supRbValue->cwdp; |
|
|
|
ui->l_cwdp->setText(QString::number(cwdpValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto curr24vValue=supRbValue->curr24V; |
|
|
|
auto curr24vValue=_supRbValue->curr24V; |
|
|
|
ui->l_curr24v->setText(QString::number(curr24vValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto p24vValue=supRbValue->p24V; |
|
|
|
auto p24vValue=_supRbValue->p24V; |
|
|
|
ui->l_p24v->setText(QString::number(p24vValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto p12vValue=supRbValue->p12V; |
|
|
|
auto p12vValue=_supRbValue->p12V; |
|
|
|
ui->l_p12v->setText(QString::number(p12vValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto p5vValue=supRbValue->p5V; |
|
|
|
auto p5vValue=_supRbValue->p5V; |
|
|
|
ui->l_p5v->setText(QString::number(p5vValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto m5vValue=supRbValue->m5V; |
|
|
|
auto m5vValue=_supRbValue->m5V; |
|
|
|
ui->l_m5v->setText(QString::number(m5vValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto hvStopValue=supRbValue->hvStop; |
|
|
|
auto hvStopValue=_supRbValue->hvStop; |
|
|
|
ui->l_hvStop->setText(QString::number(hvStopValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
auto p4dValue=supRbValue->p4D; |
|
|
|
auto p4dValue=_supRbValue->p4D; |
|
|
|
ui->l_p4d->setText(QString::number(p4dValue, 'f', 3)); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
/********************Faults***********************/ |
|
|
|
_trx.mpsFaultStatus(faultStatus); |
|
|
|
_trx.mpsFaultStatus(_faultStatus); |
|
|
|
|
|
|
|
bool hvapFlt=faultStatus->hvap; |
|
|
|
bool hvapFlt=_faultStatus->hvap; |
|
|
|
ui->l_hvapFlt->setText(QVariant(hvapFlt).toString()); |
|
|
|
auto colorHvapFlt = hvapFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_hvapFlt, colorHvapFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool hvbpFlt=faultStatus->hvbp; |
|
|
|
bool hvbpFlt=_faultStatus->hvbp; |
|
|
|
ui->l_hvbpFlt->setText(QVariant(hvbpFlt).toString()); |
|
|
|
auto colorHvbpFlt = hvbpFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_hvbpFlt, colorHvbpFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool cwdpFlt=faultStatus->cwdp; |
|
|
|
bool cwdpFlt=_faultStatus->cwdp; |
|
|
|
ui->l_cwdFlt->setText(QVariant(cwdpFlt).toString()); |
|
|
|
auto colorCwdpFlt = cwdpFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_cwdFlt, colorCwdpFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool cur24vFlt=faultStatus->curr24V; |
|
|
|
bool cur24vFlt=_faultStatus->curr24V; |
|
|
|
ui->l_curr24vFlt->setText(QVariant(cur24vFlt).toString()); |
|
|
|
auto colorCur24vFlt = cur24vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_curr24vFlt, colorCur24vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool p24vFlt=faultStatus->p24v; |
|
|
|
bool p24vFlt=_faultStatus->p24v; |
|
|
|
ui->l_p24vFlt->setText(QVariant(p24vFlt).toString()); |
|
|
|
auto colorP24vFlt = p24vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_p24vFlt, colorP24vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool p12vFlt=faultStatus->p12v; |
|
|
|
bool p12vFlt=_faultStatus->p12v; |
|
|
|
ui->l_p12vFlt->setText(QVariant(p12vFlt).toString()); |
|
|
|
auto colorP12vFlt = p12vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_p12vFlt, colorP12vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool p5vFlt=faultStatus->p5v; |
|
|
|
bool p5vFlt=_faultStatus->p5v; |
|
|
|
ui->l_p5vFlt->setText(QVariant(p5vFlt).toString()); |
|
|
|
auto colorP5vFlt = p5vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_p5vFlt, colorP5vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool m5vFlt=faultStatus->m5v; |
|
|
|
bool m5vFlt=_faultStatus->m5v; |
|
|
|
ui->l_m5vFlt->setText(QVariant(m5vFlt).toString()); |
|
|
|
auto colorM5vFlt = m5vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_m5vFlt, colorM5vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool hvFlt=faultStatus->hvError; |
|
|
|
bool hvFlt=_faultStatus->hvError; |
|
|
|
ui->l_hvFlt->setText(QVariant(hvFlt).toString()); |
|
|
|
auto colorHvFlt = hvFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_hvFlt, colorHvFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool sup4dFlt=faultStatus->sup4d; |
|
|
|
bool sup4dFlt=_faultStatus->sup4d; |
|
|
|
ui->l_p4dFlt->setText(QVariant(sup4dFlt).toString()); |
|
|
|
auto colorP4dFlt = sup4dFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_p4dFlt, colorP4dFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
/******************Faults_Over*********************/ |
|
|
|
bool ovrHvapFlt=faultStatus->overHvap; |
|
|
|
bool ovrHvapFlt=_faultStatus->overHvap; |
|
|
|
ui->l_ovrHVapFlt->setText(QVariant(ovrHvapFlt).toString()); |
|
|
|
auto colorOvrHvapFlt = ovrHvapFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrHVapFlt, colorOvrHvapFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrHvbpFlt=faultStatus->overHvbp; |
|
|
|
bool ovrHvbpFlt=_faultStatus->overHvbp; |
|
|
|
ui->l_ovrHVbpFlt->setText(QVariant(ovrHvbpFlt).toString()); |
|
|
|
auto colorOvrHvbpFlt = ovrHvbpFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrHVbpFlt, colorOvrHvbpFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrCwdpFlt=faultStatus->overCwdp; |
|
|
|
bool ovrCwdpFlt=_faultStatus->overCwdp; |
|
|
|
ui->l_ovrCWdpFlt->setText(QVariant(ovrCwdpFlt).toString()); |
|
|
|
auto colorOvrCwdpFlt = ovrCwdpFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrCWdpFlt, colorOvrCwdpFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrCur24vFlt=faultStatus->overCurr24V; |
|
|
|
bool ovrCur24vFlt=_faultStatus->overCurr24V; |
|
|
|
ui->l_ovrCur24vFlt->setText(QVariant(ovrCur24vFlt).toString()); |
|
|
|
auto colorOvrCur24vFlt = ovrCur24vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrCur24vFlt, colorOvrCur24vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrP24vFlt=faultStatus->overP24v; |
|
|
|
bool ovrP24vFlt=_faultStatus->overP24v; |
|
|
|
ui->l_ovrP24vFlt->setText(QVariant(ovrP24vFlt).toString()); |
|
|
|
auto colorOvrP24vFlt = ovrP24vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrP24vFlt, colorOvrP24vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrP12vFlt=faultStatus->overP12v; |
|
|
|
bool ovrP12vFlt=_faultStatus->overP12v; |
|
|
|
ui->l_ovrP12vFlt->setText(QVariant(ovrP12vFlt).toString()); |
|
|
|
auto colorOvrP12vFlt = ovrP12vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrP12vFlt, colorOvrP12vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrP5vFlt=faultStatus->overP5v; |
|
|
|
bool ovrP5vFlt=_faultStatus->overP5v; |
|
|
|
ui->l_ovrP5vFlt->setText(QVariant(ovrP5vFlt).toString()); |
|
|
|
auto colorOvrP5vFlt = ovrP5vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrP5vFlt, colorOvrP5vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrM5vFlt=faultStatus->overM5v; |
|
|
|
bool ovrM5vFlt=_faultStatus->overM5v; |
|
|
|
ui->l_ovrM5vFlt->setText(QVariant(ovrM5vFlt).toString()); |
|
|
|
auto colorOvrM5vFlt = ovrM5vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrM5vFlt, colorOvrM5vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrHvFlt=faultStatus->overHvError; |
|
|
|
bool ovrHvFlt=_faultStatus->overHvError; |
|
|
|
ui->l_ovrHvFlt->setText(QVariant(ovrHvFlt).toString()); |
|
|
|
auto colorOvrHvFlt = ovrHvFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovrHvFlt, colorOvrHvFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool ovrSup4dFlt=faultStatus->overSup4d; |
|
|
|
bool ovrSup4dFlt=_faultStatus->overSup4d; |
|
|
|
ui->l_ovr4dFlt->setText(QVariant(ovrSup4dFlt).toString()); |
|
|
|
auto colorOvrP4dFlt = ovrSup4dFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_ovr4dFlt, colorOvrP4dFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
/******************Faults_Under*********************/ |
|
|
|
bool udrHvapFlt=faultStatus->underHvap; |
|
|
|
bool udrHvapFlt=_faultStatus->underHvap; |
|
|
|
ui->l_udrHVapFlt->setText(QVariant(udrHvapFlt).toString()); |
|
|
|
auto colorUdrHvapFlt = udrHvapFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrHVapFlt, colorUdrHvapFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrHvbpFlt=faultStatus->underHvbp; |
|
|
|
bool udrHvbpFlt=_faultStatus->underHvbp; |
|
|
|
ui->l_udrHVbpFlt->setText(QVariant(udrHvbpFlt).toString()); |
|
|
|
auto colorUdrHvbpFlt = udrHvbpFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrHVbpFlt, colorUdrHvbpFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrCwdpFlt=faultStatus->underCwdp; |
|
|
|
bool udrCwdpFlt=_faultStatus->underCwdp; |
|
|
|
ui->l_udrCWdpFlt->setText(QVariant(udrCwdpFlt).toString()); |
|
|
|
auto colorUdrCwdpFlt = udrCwdpFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrCWdpFlt, colorUdrCwdpFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrCur24vFlt=faultStatus->underCurr24V; |
|
|
|
bool udrCur24vFlt=_faultStatus->underCurr24V; |
|
|
|
ui->l_udrCurr24vFlt->setText(QVariant(udrCur24vFlt).toString()); |
|
|
|
auto colorUdrCur24vFlt = udrCur24vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrCurr24vFlt, colorUdrCur24vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrP24vFlt=faultStatus->underP24v; |
|
|
|
bool udrP24vFlt=_faultStatus->underP24v; |
|
|
|
ui->l_udrP24vFlt->setText(QVariant(udrP24vFlt).toString()); |
|
|
|
auto colorUdrP24vFlt = udrP24vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrP24vFlt, colorUdrP24vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrP12vFlt=faultStatus->underP12v; |
|
|
|
bool udrP12vFlt=_faultStatus->underP12v; |
|
|
|
ui->l_udrP12vFlt->setText(QVariant(udrP12vFlt).toString()); |
|
|
|
auto colorUdrP12vFlt = udrP12vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrP12vFlt, colorUdrP12vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrP5vFlt=faultStatus->underP5v; |
|
|
|
bool udrP5vFlt=_faultStatus->underP5v; |
|
|
|
ui->l_udrP5vFlt->setText(QVariant(udrP5vFlt).toString()); |
|
|
|
auto colorUdrP5vFlt = udrP5vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrP5vFlt, colorUdrP5vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrM5vFlt=faultStatus->underM5v; |
|
|
|
bool udrM5vFlt=_faultStatus->underM5v; |
|
|
|
ui->l_udrM5vFlt->setText(QVariant(udrM5vFlt).toString()); |
|
|
|
auto colorUdrM5vFlt = udrM5vFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrM5vFlt, colorUdrM5vFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrHvFlt=faultStatus->underHvError; |
|
|
|
bool udrHvFlt=_faultStatus->underHvError; |
|
|
|
ui->l_udrHvFlt->setText(QVariant(udrHvFlt).toString()); |
|
|
|
auto colorUdrHvFlt = udrHvFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udrHvFlt, colorUdrHvFlt); |
|
|
|
delay(10); |
|
|
|
|
|
|
|
bool udrSup4dFlt=faultStatus->underSup4d; |
|
|
|
bool udrSup4dFlt=_faultStatus->underSup4d; |
|
|
|
ui->l_udr4dFlt->setText(QVariant(udrSup4dFlt).toString()); |
|
|
|
auto colorUdrP4dFlt = udrSup4dFlt ? Qt::red : Qt::green; |
|
|
|
changeLabelTextColor(ui->l_udr4dFlt, colorUdrP4dFlt); |
|
|
@ -2888,10 +2933,15 @@ void MainWindow::on_btn_setAtgcMode_clicked() |
|
|
|
void MainWindow::on_btn_trxRomWrite_clicked() |
|
|
|
{ |
|
|
|
|
|
|
|
QByteArray arr; |
|
|
|
arr.clear(); |
|
|
|
QString txtStr = ui->tb_trxRomWrite->toPlainText(); |
|
|
|
try |
|
|
|
{ |
|
|
|
QString txtStr = ui->tb_trxRomWrite->toPlainText(); |
|
|
|
trxEepromWrite(txtStr, 0, _bCtrl); |
|
|
|
foreach (auto i, txtStr){ |
|
|
|
arr.append(i.toLatin1()); |
|
|
|
} |
|
|
|
trxEepromWrite(arr, 0, _bCtrl); |
|
|
|
} |
|
|
|
catch (SonoException& e) |
|
|
|
{ |
|
|
@ -2934,10 +2984,15 @@ void MainWindow::on_btn_trxRomInfoRead_clicked() |
|
|
|
void MainWindow::on_btn_mpsRomWrite_clicked() |
|
|
|
{ |
|
|
|
|
|
|
|
QByteArray arr; |
|
|
|
arr.clear(); |
|
|
|
QString txtStr = ui->tb_mpsRomWrite->toPlainText(); |
|
|
|
try |
|
|
|
{ |
|
|
|
QString txtStr = ui->tb_mpsRomWrite->toPlainText(); |
|
|
|
mpsEepromWrite(txtStr, 0, _bCtrl); |
|
|
|
foreach (auto i, txtStr){ |
|
|
|
arr.append(i.toLatin1()); |
|
|
|
} |
|
|
|
mpsEepromWrite(arr, 0, _bCtrl); |
|
|
|
} |
|
|
|
catch (SonoException& e) |
|
|
|
{ |
|
|
@ -2980,10 +3035,15 @@ void MainWindow::on_btn_mpsRomInfoRead_clicked() |
|
|
|
void MainWindow::on_btn_prbCtrlRomWrite_clicked() |
|
|
|
{ |
|
|
|
|
|
|
|
QByteArray arr; |
|
|
|
arr.clear(); |
|
|
|
QString txtStr = ui->tb_prbCtrlRomWrite->toPlainText(); |
|
|
|
try |
|
|
|
{ |
|
|
|
QString txtStr = ui->tb_prbCtrlRomWrite->toPlainText(); |
|
|
|
prbCtrlEepromWrite(txtStr, 0, _bCtrl); |
|
|
|
foreach (auto i, txtStr){ |
|
|
|
arr.append(i.toLatin1()); |
|
|
|
} |
|
|
|
prbCtrlEepromWrite(arr, 0, _bCtrl); |
|
|
|
} |
|
|
|
catch (SonoException& e) |
|
|
|
{ |
|
|
@ -3026,11 +3086,16 @@ void MainWindow::on_btn_prbCtrlRomInfoRead_clicked() |
|
|
|
void MainWindow::on_btn_prbRomWrite_clicked() |
|
|
|
{ |
|
|
|
|
|
|
|
QByteArray arr; |
|
|
|
arr.clear(); |
|
|
|
auto sel = ui->cb_prbSelRom->currentIndex(); |
|
|
|
QString txtStr = ui->tb_prbRomWrite->toPlainText(); |
|
|
|
try |
|
|
|
{ |
|
|
|
auto sel = ui->cb_prbSelRom->currentIndex(); |
|
|
|
QString txtStr = ui->tb_prbRomWrite->toPlainText(); |
|
|
|
prbEepromWrite(txtStr, 0, static_cast<quint8>(sel), _bCtrl); |
|
|
|
foreach (auto i, txtStr){ |
|
|
|
arr.append(i.toLatin1()); |
|
|
|
} |
|
|
|
prbEepromWrite(arr, 0, static_cast<quint8>(sel), _bCtrl); |
|
|
|
} |
|
|
|
catch (SonoException& e) |
|
|
|
{ |
|
|
@ -3061,8 +3126,8 @@ void MainWindow::on_btn_prbRomInfoRead_clicked() |
|
|
|
try |
|
|
|
{ |
|
|
|
auto sel = ui->cb_prbSelRom->currentIndex(); |
|
|
|
QString infoStr = _trx.prbInfo(static_cast<quint8>(sel)); |
|
|
|
ui->tb_prbRomInfoRead->setText(infoStr); |
|
|
|
QByteArray arr = _trx.prbInfo(static_cast<quint8>(sel)); |
|
|
|
ui->tb_prbRomInfoRead->setText(QString(arr)); |
|
|
|
} |
|
|
|
catch (SonoException& e) |
|
|
|
{ |
|
|
@ -3239,3 +3304,4 @@ void MainWindow::on_btn_afeLut_clicked() |
|
|
|
changeLabelTextColor(ui->l_afeLut, Qt::green); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|