Corretta gestione Heartbeat
This commit is contained in:
@@ -92,13 +92,13 @@ void RoboGlue_GUI::disableLockAxes(){
|
||||
void RoboGlue_GUI::on_commonStatusChange() {
|
||||
modlog->trace("on_commonStatusChange Received");
|
||||
// TODO: aggiungere e interpretare le flag per capire se i nodi ros sono tutti vivi dall'heartbeat
|
||||
this->ui->lbl_relay->setText(QString().fromStdString(std::to_string(m->commonStatus.relayLast)));
|
||||
this->ui->lbl_follower->setText(QString().fromStdString(std::to_string(m->commonStatus.followerLast)));
|
||||
this->ui->lbl_recorder->setText(QString().fromStdString(std::to_string(m->commonStatus.recorderLast)));
|
||||
this->ui->lbl_relay->setText(QString().fromStdString(std::to_string(m->commonStatus.relayTime)));
|
||||
this->ui->lbl_follower->setText(QString().fromStdString(std::to_string(m->commonStatus.followerTime)));
|
||||
this->ui->lbl_recorder->setText(QString().fromStdString(std::to_string(m->commonStatus.recorderTime)));
|
||||
|
||||
if(m->commonStatus.relayLast > m->comSettings.deadTime ||
|
||||
m->commonStatus.followerLast > m->comSettings.deadTime ||
|
||||
m->commonStatus.recorderLast > m->comSettings.deadTime) {
|
||||
if(m->commonStatus.relayTime > m->comSettings.deadTime ||
|
||||
m->commonStatus.followerTime > m->comSettings.deadTime ||
|
||||
m->commonStatus.recorderTime > 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; }");
|
||||
|
||||
Reference in New Issue
Block a user