Created a version that regulates negatively. Buggy, though. Enough for pre-compliance but must be fixed afterwards

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@264 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-25 06:33:49 +00:00
parent a41e792565
commit 6cc49f4e47
11 changed files with 147 additions and 42 deletions

View File

@@ -27,6 +27,8 @@
#include "repairProcessRow.h"
#include "PCBA.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
@@ -58,6 +60,9 @@ ErrorStatus repairProcessRow_construct(struct RepairProcessRow* self, const stru
{
ErrorStatus returnValue = SUCCESS;
int iMin = 0;
int iMax = 0;
if (!self->initialized)
{
if (returnValue == SUCCESS)
@@ -75,7 +80,22 @@ ErrorStatus repairProcessRow_construct(struct RepairProcessRow* self, const stru
if (returnValue == SUCCESS)
{
returnValue = PID_construct(&self->pid, 3000, 2000, 0, 0, 100000000);
if (PCBA_getInstance()->pcba == PCBA_Anode)
{
iMin = 0;
iMax = 100000000;
}
else if (PCBA_getInstance()->pcba == PCBA_CathodeMCP)
{
iMin = -100000000;
iMax = 0;
}
else if (PCBA_getInstance()->pcba == PCBA_Tesla)
{
iMin = 0;
iMax = 100000000;
}
returnValue = PID_construct(&self->pid, 3000, 2000, 0, iMin, iMax);
}
if (returnValue == SUCCESS)
{