int nowspeed;
int targetspeed;
int nowdistance;
int targetdistance;
int orderspeed;
int ifdone;//是否完成定位。
}Encoder_structure;
static Encoder_structure EncoderStatus[4];
static int pre[4],now[4],encoderhigh[4]={0,0,0,0};
static int speed[4];
static const int kp_0[4] = {0, 30, 30, 30};
static const int ki_0[4] = {0, 100, 100, 100};
//static int kd_1[4] = {0, -100, -100, -100};
static const int kd_0[4] = {0, -10, -10, -10};
|