Corretta logica colorazione etichette stato nodi ROS

This commit is contained in:
2019-11-18 11:37:04 +01:00
parent 57c2b4ed3a
commit 5942c9b21a

View File

@@ -95,13 +95,13 @@ void RoboGlue_GUI::on_commonStatusChange() {
this->ui->lbl_follower->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("follower")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.followerTime)))); this->ui->lbl_follower->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("follower")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.followerTime))));
this->ui->lbl_recorder->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("recorder")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.recorderTime)))); this->ui->lbl_recorder->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("recorder")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.recorderTime))));
this->ui->lbl_broadcaster->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("broadcaster")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.broadcasterTime)))); this->ui->lbl_broadcaster->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("broadcaster")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.broadcasterTime))));
if (m->commonStatus.relayRunning) this->ui->lbl_relay->setStyleSheet("QLabel { background-color : red; color : white; }"); if (!m->commonStatus.relayRunning) this->ui->lbl_relay->setStyleSheet("QLabel { background-color : red; color : white; }");
else this->ui->lbl_relay->setStyleSheet("QLabel { background-color : green; color : white; }"); else this->ui->lbl_relay->setStyleSheet("QLabel { background-color : green; color : white; }");
if (m->commonStatus.recorderRunning) this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : red; color : white; }"); if (!m->commonStatus.recorderRunning) this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : red; color : white; }");
else this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : green; color : white; }"); else this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : green; color : white; }");
if (m->commonStatus.followerRunning) this->ui->lbl_follower->setStyleSheet("QLabel { background-color : red; color : white; }"); if (!m->commonStatus.followerRunning) this->ui->lbl_follower->setStyleSheet("QLabel { background-color : red; color : white; }");
else this->ui->lbl_follower->setStyleSheet("QLabel { background-color : green; color : white; }"); else this->ui->lbl_follower->setStyleSheet("QLabel { background-color : green; color : white; }");
if (m->commonStatus.broadcasterRunning) this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : red; color : white; }"); if (!m->commonStatus.broadcasterRunning) this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : red; color : white; }");
else this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : green; color : white; }"); else this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : green; color : white; }");
} }