test velocityopenloop failed

This commit is contained in:
2025-11-18 15:25:57 +08:00
parent a924ee9b94
commit 77b61cb90e
4 changed files with 115 additions and 143 deletions

15
empty.c
View File

@@ -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);
}
}