| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- /**
- * @file ALGO_PID_ATY.h
- *
- * @param Project ALGO_Algorithm_ATY_LIB
- *
- * @author ATY
- *
- * @copyright
- * - Copyright 2017 - 2026 MZ-ATY
- * - This code follows:
- * - MZ-ATY Various Contents Joint Statement -
- * <a href="https://mengze.top/MZ-ATY_VCJS">
- * https://mengze.top/MZ-ATY_VCJS</a>
- * - CC 4.0 BY-NC-SA -
- * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
- * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
- * - Your use will be deemed to have accepted the terms of this statement.
- *
- * @brief functions of CRC for all codes
- *
- * @version
- * - 1_01_200318 > ATY
- * -# Preliminary version, first Release
- * - 1_02_200318 > ATY
- * -# Add Conditional Compilation
- * -# Add user port
- **********************************************************************************
- */
- #ifndef __ALGO_PID_ATY_H
- #define __ALGO_PID_ATY_H
- #include "INCLUDE_ATY.h"
- /******************************* For user *************************************/
- /******************************************************************************/
- typedef struct PID{
- double SetPoint; // Set point desired value
- double Proportion; // Proportional const
- double Integral; // Integral const
- double Derivative; // Derivative const
- double LastError; // Error[-1]
- double PrevError; // Error[-2]
- double SumError; // Sums of errors
- }PID;
- double PidCalc(PID* pidStruct, double nextPoint);
- void PidInitZero(PID* pidStruct);
- void PidClearZero(PID* pidStruct);
- // #define ALGO_PID_ATY_Test_ATY
- #ifdef ALGO_PID_ATY_Test_ATY
- void ALGO_PID_ATY_Test(void);
- #endif /* ALGO_PID_ATY_Test_ATY */
- #endif /* __ALGO_PID_ATY_H */
- /******************************** End Of File *********************************/
|