|
@@ -4,7 +4,7 @@
|
|
|
#include "config.h"
|
|
#include "config.h"
|
|
|
|
|
|
|
|
typedef enum {
|
|
typedef enum {
|
|
|
- Foc_Start_Motor = 1, //foc_start_stop_t, ready, unread, 014d01
|
|
|
|
|
|
|
+ Foc_Start_Motor = 32, //foc_start_stop_t, ready, unread, 014d01
|
|
|
Foc_Cali_Hall_Phase, //calibrate hall phase, get the angle when motor running 0-360
|
|
Foc_Cali_Hall_Phase, //calibrate hall phase, get the angle when motor running 0-360
|
|
|
Foc_Cali_Hall_Offset,//calibrate hall offset from A phase 0x034d00
|
|
Foc_Cali_Hall_Offset,//calibrate hall offset from A phase 0x034d00
|
|
|
Foc_Set_iDC_Limit, //u32, set the limited current//mA
|
|
Foc_Set_iDC_Limit, //u32, set the limited current//mA
|
|
@@ -41,7 +41,7 @@ typedef enum {
|
|
|
Foc_Report_Pid,
|
|
Foc_Report_Pid,
|
|
|
Foc_Report_Status,
|
|
Foc_Report_Status,
|
|
|
Foc_Report_MTPA_DQ_Angle,
|
|
Foc_Report_MTPA_DQ_Angle,
|
|
|
- Foc_Cmd_Max = 255
|
|
|
|
|
|
|
+ Foc_Cmd_Max = 0xE0
|
|
|
}foc_cmd_t;
|
|
}foc_cmd_t;
|
|
|
#define CMD_2_CAN_KEY(cmd) ((u16)(((u16)cmd) | (CAN_MY_ADDRESS<<8)))
|
|
#define CMD_2_CAN_KEY(cmd) ((u16)(((u16)cmd) | (CAN_MY_ADDRESS<<8)))
|
|
|
typedef enum {
|
|
typedef enum {
|