Aggiunto nodo broadcaster a interfaccia e shared memory

This commit is contained in:
2019-11-15 14:49:45 +01:00
parent 623ae0bedb
commit 5c7caa3259
4 changed files with 18 additions and 8 deletions

View File

@@ -95,17 +95,21 @@ void RoboGlue_GUI::on_commonStatusChange() {
this->ui->lbl_relay->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("relay")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.relayTime))));
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_broadcaster->setText(QString().fromStdString(this->m->comSettings.nodeNames.find("broadcaster")->second+": "+std::to_string(static_cast<uint>(m->commonStatus.broadcasterTime))));
if(m->commonStatus.relayTime > m->comSettings.deadTime ||
m->commonStatus.followerTime > m->comSettings.deadTime ||
m->commonStatus.recorderTime > m->comSettings.deadTime) {
m->commonStatus.recorderTime > m->comSettings.deadTime ||
m->commonStatus.broadcasterTime > m->comSettings.deadTime) {
this->ui->lbl_relay->setStyleSheet("QLabel { background-color : red; color : white; }");
this->ui->lbl_follower->setStyleSheet("QLabel { background-color : red; color : white; }");
this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : red; color : white; }");
this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : red; color : white; }");
} else {
this->ui->lbl_relay->setStyleSheet("QLabel { background-color : green; color : white; }");
this->ui->lbl_follower->setStyleSheet("QLabel { background-color : green; color : white; }");
this->ui->lbl_recorder->setStyleSheet("QLabel { background-color : green; color : white; }");
this->ui->lbl_broadcaster->setStyleSheet("QLabel { background-color : green; color : white; }");
}
}