pid.cpp

来自「pid C 元马 绝对好用 谢谢 大家 谢谢」· C++ 代码 · 共 21 行

CPP
21
字号
#include <stdio.h>
#include <stdlib.h>
struct _pid {
int pv; /*integer that contains the process value*/
int sp; /*integer that contains the set point*/
float integral;
float pgain;
float igain;
float dgain;
int deadband;
int last_error;
};
struct _pid warm,*pid;
int process_point, set_point,dead_band;
float p_gain, i_gain, d_gain, integral_val,new_integ;;
/*------------------------------------------------------------------------
pid_init
 DESCRIPTION This function initializes the pointers in the _pid structure
  to the process variable and the setpoint. *pv and *sp are
  integer pointers.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?