diff --git a/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/Interlock.c b/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/Interlock.c index 7b4f789..2c3f50b 100644 --- a/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/Interlock.c +++ b/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/Interlock.c @@ -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->NC.io, &nc, 1, &actualLength); - if ((no != 0) && (nc == 0)) + if ((nc != 0) && (no == 0)) { returnValue = true; } diff --git a/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/PID.c b/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/PID.c index e53b690..22dfd60 100644 --- a/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/PID.c +++ b/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/src/PID.c @@ -116,7 +116,7 @@ int PID_calculate(struct Pid* self, int error) // Calculate proportional 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; self->input_d1 = error;