Commit for SWO for HW validation menu updates

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@245 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-10 12:46:41 +00:00
parent a73154a5e6
commit a688a6549a
19 changed files with 720 additions and 89 deletions

View File

@@ -0,0 +1,92 @@
// -----------------------------------------------------------------------------
/// @file PID.c
/// @brief Description
// -----------------------------------------------------------------------------
// Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn
// Postbus 92, 9800 AB Zuidhorn
// The Netherlands
// Tel: +31 594 503020
// Fax: +31 594 505825
// Email: support@microkey.nl
// Web: www.microkey.nl
// -----------------------------------------------------------------------------
/// $Revision$
/// $Author$
/// $Date$
// (c) 2017 Micro-Key bv
// -----------------------------------------------------------------------------
/// @file PID.c
/// @ingroup {group_name}
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "PID.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
ErrorStatus PID_construct(struct Pid* self, int Kp, int Ki, int Kd)
{
ErrorStatus returnValue = SUCCESS;
if (!self->initialized)
{
self->Kd = Kd;
self->Ki = Ki;
self->Kp = Kp;
self->input_d1 = 0;
self->initialized = true;
}
else
{
returnValue = ERROR;
}
return returnValue;
}
int PID_calculate(struct Pid* self, int error)
{
int returnValue = 0;
if (self->initialized)
{
}
return returnValue;
}