添加ADC采集电压和RGB灯
This commit is contained in:
10
APP/foc.c
10
APP/foc.c
@ -5,7 +5,7 @@
|
||||
#define _constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
|
||||
|
||||
|
||||
float Voltage_PowerSupply = 12;
|
||||
const float Voltage_PowerSupply = 12;
|
||||
float Pole_Pairs = 14;
|
||||
float Voltage_Limit = 6.9;
|
||||
float Velocity_Limit = 100;
|
||||
@ -17,15 +17,15 @@ FOCTypeDef FOCStruct_Y={0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
|
||||
void PID_Iint(void)
|
||||
{
|
||||
FOCStruct_X.ZT_KP = 4;
|
||||
FOCStruct_X.ZT_KP = 3.5;
|
||||
FOCStruct_X.ZT_KI = 0;
|
||||
FOCStruct_X.ZT_KD = 0.5;
|
||||
|
||||
FOCStruct_X.V_KP = 0.1;
|
||||
FOCStruct_X.V_KI = 2;
|
||||
FOCStruct_X.V_KI = 1;
|
||||
FOCStruct_X.V_KD = 0;
|
||||
//2024/1/2 Y<><59>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
FOCStruct_Y.ZT_KP = 2;
|
||||
///////////
|
||||
FOCStruct_Y.ZT_KP = 3;
|
||||
FOCStruct_Y.ZT_KI = 0;
|
||||
FOCStruct_Y.ZT_KD = 0.5;
|
||||
|
||||
|
Reference in New Issue
Block a user