velocity-close-loop test passed;find the uart bug that uart cannot receive over 6 bytes
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#include "dfoc.h"
|
#include "dfoc.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "delay.h"
|
#include "delay.h"
|
||||||
|
|||||||
4
empty.c
4
empty.c
@@ -56,7 +56,7 @@ int M1_PP = 7, M1_DIR = 1;
|
|||||||
int Motor0 = 0;
|
int Motor0 = 0;
|
||||||
int Motor1 = 1;
|
int Motor1 = 1;
|
||||||
|
|
||||||
float M0_Target = 20.0; // 串口目标值
|
float M0_Target = 10.0; // 串口目标值
|
||||||
float M1_Target = 20.0; // 串口目标值
|
float M1_Target = 20.0; // 串口目标值
|
||||||
|
|
||||||
#define UART_PACKET_SIZE (6)
|
#define UART_PACKET_SIZE (6)
|
||||||
@@ -132,7 +132,9 @@ void TIMER_0_INST_IRQHandler(void) {
|
|||||||
case DL_TIMERG_INTERRUPT_ZERO_EVENT:
|
case DL_TIMERG_INTERRUPT_ZERO_EVENT:
|
||||||
|
|
||||||
printf("Target is %f \n", Target);
|
printf("Target is %f \n", Target);
|
||||||
|
M0_Target = Target;
|
||||||
// printf("%s",gUartRxPacket);
|
// printf("%s",gUartRxPacket);
|
||||||
|
Print_Velocity(0);
|
||||||
DL_GPIO_togglePins(LED_PORT, LED_PA0_PIN);
|
DL_GPIO_togglePins(LED_PORT, LED_PA0_PIN);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user