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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user