Commit b7902e9b authored by Ivan Tyagov's avatar Ivan Tyagov

Fixup.

parent 0523d0f4
......@@ -264,7 +264,7 @@ void callbackCheckHeartBeat() {
is_down = (timestamp_delta > HEART_BEAT_TIMEOUT_INTERVAL);
if (is_down) {
// count for stats the switch to SAFE mode
if (CURRENT_STATE != (unsigned int)STATE_DOWN) {
if (CURRENT_STATE != (int)STATE_DOWN) {
CURRENT_STATE = STATE_DOWN;
SAFE_MODE_STATE_COUNTER += 1;
UA_LOG_INFO(UA_Log_Stdout, \
......@@ -276,11 +276,11 @@ void callbackCheckHeartBeat() {
}
else {
// all good, we received a keep alive in time
if (CURRENT_STATE == (unsigned int)STATE_NO_INITIAL_HEART_BEAT) {
if (CURRENT_STATE == (int)STATE_NO_INITIAL_HEART_BEAT) {
// initial keep alive received, printout
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "INITIAL HEART BEAT received: %s", coupler_id_str);
}
else if (CURRENT_STATE == (unsigned int)STATE_DOWN) {
else if (CURRENT_STATE == (int)STATE_DOWN) {
// initial keep alive received, printout
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND,
"UP (recovered %d times): %s", SAFE_MODE_STATE_COUNTER, coupler_id_str);
......@@ -292,7 +292,7 @@ void callbackCheckHeartBeat() {
}
else {
// still no hear beat from this coupler ...
if (CURRENT_STATE != (unsigned int)STATE_NO_INITIAL_HEART_BEAT){
if (CURRENT_STATE != (int)STATE_NO_INITIAL_HEART_BEAT){
CURRENT_STATE = STATE_NO_INITIAL_HEART_BEAT;
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "NO INITIAL HEART BEAT: %s", coupler_id_str);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment