xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

C語言 增量式 PID 代碼 測試可用的 只需要調節KP KI KD即可

資源截圖

代碼片段和文件信息

/*
?*?PID.c
?*
?*??Created?on:?2013-3-23
?*??????Author:?feng
?*/

#include?“PID.h“

static?PID?PID_RANGE;

void?PID_InitCalc(void);
void?Servo_PIDControl(void);
void?PID_Init(PID*?p_PID);
int16?PID_Calc(PID*?p_PID?int32?PID_ADC0?int32?PID_ADC6);

void?PID_InitCalc(void)
{
PID_Init(&PID_RANGE);
}

void?Servo_PIDControl(void)
{
uint32?temp_adc0;
uint32?temp_adc6;
int32?temp_speed;
signed?long?temp_scope;

temp_adc0?=?GetADCValue(0x00);//select?channel?ADC0
temp_adc0?=?ADC0_Kalman_Filter((uint32)temp_adc0);//filter
Uart1_Send_Scope(temp_adc01);

temp_adc6?=?GetADCValue(0x06);//select?channel?ADC6
temp_adc6?=?ADC6_Kalman_Filter((uint32)temp_adc6);//filter
Uart1_Send_Scope(temp_adc62);

temp_scope?=?(signed?long)temp_adc0?-?(signed?long)temp_

評論

共有 條評論