test velocityopenloop failed
This commit is contained in:
15
empty.c
15
empty.c
@@ -48,7 +48,7 @@ extern bool gIsI2cError;
|
||||
const float num_f = 0.123456f;
|
||||
|
||||
volatile uint16_t count = 0;
|
||||
volatile float Target = 0; // 串口目标值
|
||||
volatile float Target = 15; // 串口目标值
|
||||
|
||||
const int pp = 7; // 电机极对数
|
||||
const int Dir = -1; // 电机编码器方向
|
||||
@@ -116,15 +116,18 @@ int main(void) {
|
||||
// delay_ms(10);
|
||||
|
||||
// 开环
|
||||
// velocityopenloop(Target);
|
||||
// 闭环
|
||||
Set_Angle(Target);
|
||||
velocityopenloop(Target);
|
||||
|
||||
// //test MT6701
|
||||
// MT6701_get_angle_degree();
|
||||
// printf("angle degree is %f \n", angle_f);
|
||||
|
||||
// // 闭环
|
||||
// Set_Angle(Target);
|
||||
if (gCheckUART) {
|
||||
gCheckUART = false;
|
||||
parse_uart_cmd();
|
||||
// Set_Angle(Target);
|
||||
}
|
||||
delay_ms(10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user