Updated Interlocks (NO and NC inverted)

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@256 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-18 08:11:09 +00:00
parent 088ce81dc7
commit 97a42de2ea
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ bool Interlock_isClosed(struct Interlock* self)
IODevice_read((struct IODevice*)self->NO.io, &no, 1, &actualLength); IODevice_read((struct IODevice*)self->NO.io, &no, 1, &actualLength);
IODevice_read((struct IODevice*)self->NC.io, &nc, 1, &actualLength); IODevice_read((struct IODevice*)self->NC.io, &nc, 1, &actualLength);
if ((no != 0) && (nc == 0)) if ((nc != 0) && (no == 0))
{ {
returnValue = true; returnValue = true;
} }

View File

@@ -116,7 +116,7 @@ int PID_calculate(struct Pid* self, int error)
// Calculate proportional // Calculate proportional
pTerm = (self->Kp * error); pTerm = (self->Kp * error);
LOGGER_WARNING(mainLog, "pTerm %d, Kp %d, error %d", pTerm, self->Kp, error); LOGGER_WARNING(mainLog, "pTerm %d, iTerm %d, Kp %d, Ki %d, error %d", pTerm, self->iTerm, self->Kp, self->Ki, error);
returnValue = (self->iTerm + dTerm + pTerm) / PID_FIXED_POINT_FACTOR; returnValue = (self->iTerm + dTerm + pTerm) / PID_FIXED_POINT_FACTOR;
self->input_d1 = error; self->input_d1 = error;