From a9aa2e19c8931136a3df6fdf3f1f282f499b0ede Mon Sep 17 00:00:00 2001 From: 4x-tech Date: Thu, 20 Nov 2025 15:05:28 +0800 Subject: [PATCH] velocity-close-loop test passed;find the uart bug that uart cannot receive over 6 bytes --- 3rd/dfoc.c | 1 - empty.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/3rd/dfoc.c b/3rd/dfoc.c index 49b6517..f387ace 100644 --- a/3rd/dfoc.c +++ b/3rd/dfoc.c @@ -1,4 +1,3 @@ - #include "dfoc.h" #include "config.h" #include "delay.h" diff --git a/empty.c b/empty.c index d5fdb5a..a31c37c 100644 --- a/empty.c +++ b/empty.c @@ -56,7 +56,7 @@ int M1_PP = 7, M1_DIR = 1; int Motor0 = 0; int Motor1 = 1; -float M0_Target = 20.0; // 串口目标值 +float M0_Target = 10.0; // 串口目标值 float M1_Target = 20.0; // 串口目标值 #define UART_PACKET_SIZE (6) @@ -132,7 +132,9 @@ void TIMER_0_INST_IRQHandler(void) { case DL_TIMERG_INTERRUPT_ZERO_EVENT: printf("Target is %f \n", Target); + M0_Target = Target; // printf("%s",gUartRxPacket); + Print_Velocity(0); DL_GPIO_togglePins(LED_PORT, LED_PA0_PIN); break;