控制方式修改

This commit is contained in:
2025-10-25 19:21:10 +08:00
parent 2cb9446870
commit 5abc24f215
3 changed files with 10 additions and 11 deletions
@@ -15,7 +15,7 @@ volatile uint16_t g_accelTimer = 0;
static uint16_t accelCounter = 0;
static uint8_t DcMotorDispEn = false;
static uint8_t DcMotorDispEn = true;
#define DCMOTOR_DBG_LOG(...) { if(DcMotorDispEn) DBG_LOG(__VA_ARGS__);}
#define DCMOTOR_DBG_ARRAY(ARRAY, SIZE) { if(DcMotorDispEn) {DBG_ARRAY(ARRAY,SIZE)}}
+8 -4
View File
@@ -15,7 +15,7 @@
#define SHIELD_VPT 2500
#define EME_STOP_VPT 10000
#define STOP_TIME_MS 500
#define STOP_TIME_MS 0
#define RUN_TIME_MS 0
#define EME_START_MS 3000
#define EME_STOP_MS 3000
@@ -23,10 +23,14 @@
#define TRAVEL_TIME_MS 30000
#define BDC_STOP() (SET_TWIN_BIT0(),SET_TWIN_BIT1())
#define BDC_UP() (SET_TWIN_BIT0(),CLR_TWIN_BIT1())
#define BDC_DOWN() (SET_TWIN_BIT1(),CLR_TWIN_BIT0())
//#define BDC_STOP() (SET_TWIN_BIT0(),SET_TWIN_BIT1())
//#define BDC_UP() (SET_TWIN_BIT0(),CLR_TWIN_BIT1())
//#define BDC_DOWN() (SET_TWIN_BIT1(),CLR_TWIN_BIT0())
#define BDC_STOP() Motor_Control(MOTOR_CMD_STOP)
#define BDC_UP() Motor_Control(MOTOR_CMD_FORWARD)
#define BDC_DOWN() Motor_Control(MOTOR_CMD_REVERSE)
/*控制等级*/
typedef enum {
LEVEL_1 = 1, // 一级