#include "config.h" #include "string.h" #define CONFIG_BASE_ADDRESS (ADDR_FLASH_SECTOR_11) #ifdef DEBUG Config_Param_t config = { #else static const Config_Param_t config = { #endif .chassis = { /* DJI3508µç»ú*/ .motor_param = { { .can = BSP_CAN_1, .id = 0x201, .module = MOTOR_M3508, .reverse = false, .gear = true }, { .can = BSP_CAN_1, .id = 0x202, .module = MOTOR_M3508, .reverse = false, .gear = true }, { .can = BSP_CAN_1, .id = 0x203, .module = MOTOR_M3508, .reverse = false, .gear = true }, { .can = BSP_CAN_1, .id = 0x204, .module = MOTOR_M3508, .reverse = false, .gear = true }, }, .type = CHASSIS_TYPE_MECANUM, /* PID */ .pid = { /* µ×Å̵ç»ú PID */ .motor_pid_param = { .k = 0.0015f, .p = 1.0f, .i = 0.0f, .d = 0.0f, .i_limit = 1.0f, .out_limit = 1.0f, .d_cutoff_freq = -1.0f, .range = -1.0f, }, }, .low_pass_cutoff_freq = { .in = 50.0f, .out = 50.0f, } } }; /** * @brief 获取机器人配置参数 * @return 机器人配置参数指针 */ Config_Param_t *Config_GetRobotParam(void) { return &config; }