Skip to content

Commit

Permalink
use == false and update LOG_INFO
Browse files Browse the repository at this point in the history
  • Loading branch information
naheedsa committed May 20, 2024
1 parent 8fd2846 commit 30e6f1a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions indi-maxdomeii/maxdomeii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ bool MaxDomeII::ISNewNumber(const char *dev, const char *name, double values[],
int error;
int nRetry = 3;

if (TicksPerTurnNP.update(values, names, n) < 0)
if (TicksPerTurnNP.update(values, names, n) == false)
return false;

nVal = values[0];
Expand Down Expand Up @@ -622,7 +622,7 @@ bool MaxDomeII::ISNewNumber(const char *dev, const char *name, double values[],

// Incorrect value.
TicksPerTurnNP.setState(IPS_ALERT);
LOG_INFO("Invalid Ticks Per Turn");
LOG_ERROR("Invalid Ticks Per Turn");
TicksPerTurnNP.apply();

return false;
Expand Down Expand Up @@ -653,7 +653,7 @@ bool MaxDomeII::ISNewNumber(const char *dev, const char *name, double values[],
}
// Incorrect value.
HomeAzimuthNP.setState(IPS_ALERT);
LOG_INFO("Invalid home azimuth");
LOG_ERROR("Invalid home azimuth");
HomeAzimuthNP.apply();

return false;
Expand All @@ -667,7 +667,7 @@ bool MaxDomeII::ISNewNumber(const char *dev, const char *name, double values[],
double nVal;
char cLog[255];

if (WatchDogNP.update(values, names, n) < 0)
if (WatchDogNP.update(values, names, n) == false)
return false;

nVal = values[0];
Expand All @@ -682,7 +682,7 @@ bool MaxDomeII::ISNewNumber(const char *dev, const char *name, double values[],
}
// Incorrect value.
WatchDogNP.setState(IPS_ALERT);
LOG_INFO("Invalid watch dog time");
LOG_ERROR("Invalid watch dog time");
WatchDogNP.apply();

return false;
Expand Down Expand Up @@ -715,15 +715,15 @@ bool MaxDomeII::ISNewNumber(const char *dev, const char *name, double values[],
else
{
ShutterOperationAzimuthNP.setState(IPS_ALERT);
LOGF_INFO("%s", ErrorMessages[-error]);
LOGF_ERROR("%s", ErrorMessages[-error]);
ShutterOperationAzimuthNP.apply();
}

return true;
}
// Incorrect value.
ShutterOperationAzimuthNP.setState(IPS_ALERT);
LOG_INFO("Invalid shutter operation azimuth position");
LOG_ERROR("Invalid shutter operation azimuth position");
ShutterOperationAzimuthNP.apply();

return false;
Expand Down Expand Up @@ -795,7 +795,7 @@ bool MaxDomeII::ISNewSwitch(const char *dev, const char *name, ISState *states,
else
{
ShutterConflictSP.setState(IPS_ALERT);
LOGF_INFO("%s", ErrorMessages[-error]);
LOGF_ERROR("%s", ErrorMessages[-error]);
ShutterConflictSP.apply();
}
return true;
Expand Down

0 comments on commit 30e6f1a

Please sign in to comment.