Corretta gestione Heartbeat
This commit is contained in:
@@ -15,6 +15,10 @@ RoboGlue_SHARED::~RoboGlue_SHARED(){
|
||||
}
|
||||
|
||||
void RoboGlue_SHARED::on_statusTimer(void){
|
||||
double curTime = static_cast<double>(std::time(NULL));
|
||||
commonStatus.relayTime = fabs(commonStatus.relayLast - curTime);
|
||||
commonStatus.followerTime = fabs(commonStatus.followerLast - curTime);
|
||||
commonStatus.recorderTime = fabs(commonStatus.recorderLast - curTime);
|
||||
emit this->commonStatusChange();
|
||||
}
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -59,6 +59,9 @@ public:
|
||||
double relayLast = 0.0;
|
||||
double followerLast = 0.0;
|
||||
double recorderLast = 0.0;
|
||||
double relayTime = 0.0;
|
||||
double followerTime = 0.0;
|
||||
double recorderTime = 0.0;
|
||||
} commonStatus;
|
||||
|
||||
/////////// PERMANENT SETTINGS VARIABLES /////////
|
||||
|
||||
Reference in New Issue
Block a user