新手入门
- 积分
- 13
- 金钱
- 13
- 注册时间
- 2020-7-7
- 在线时间
- 4 小时
|
1金钱
本帖最后由 LookCrazy 于 2024-12-4 10:57 编辑
UART1配置:
串口调试助手配置:

PID调试助手配置:

代码部分:
初始化发送:
debug_init(); /* 初始化调试 */
debug_send_motorcode(DC_MOTOR); /* 上传电机类型(直流有刷电机) */
debug_send_motorstate(RUN_STATE); /* 上传电机状态(运行) */
/* 同步数据(选择第1组PID,目标速度地址,P,I,D参数)到上位机 */
debug_send_initdata(TYPE_PID1, (float *)(&Motor.TargetSpeed), gSpeedPid.Kp, gSpeedPid.Ki, gSpeedPid.Kd);
每200毫秒发送:
debug_send_wave_data(1, 10);
debug_send_wave_data(2, 20);
debug_send_wave_data(3, 30);
问题:串口调试助手能收到数据,但是PID调试助手没有反应,以下为串口调试助手收到的数据截图。

|
|