#include "config.h"
#include "string.h"

#define DEBUG

#define CONFIG_BASE_ADDRESS (ADDR_FLASH_SECTOR_11)

#ifdef DEBUG
Config_Param_t config_chassis ={

#else

static const Config_Param_t param_chassis ={

#endif

.chassis={
    
    .motor_3508_param[0]={BSP_CAN_1,0x201,MOTOR_M3508,false,false},
    .motor_3508_param[1]={BSP_CAN_1,0x202,MOTOR_M3508,false,false},
    .motor_3508_param[2]={BSP_CAN_1,0x203,MOTOR_M3508,false,false},
    .motor_3508_param[3]={BSP_CAN_1,0x204,MOTOR_M3508,false,false},
    
    .motor_6020_param[0]={BSP_CAN_1,0x205,MOTOR_GM6020,false,false},
    .motor_6020_param[1]={BSP_CAN_1,0x206,MOTOR_GM6020,false,false},
    .motor_6020_param[2]={BSP_CAN_1,0x207,MOTOR_GM6020,false,false},
    .motor_6020_param[3]={BSP_CAN_1,0x208,MOTOR_GM6020,false,false},
    
    .C6020Omega_param={
        .k=0.2f,
        .p=0.1f,
        .i=0.0f,
        .d=0.0f,
        .i_limit=0.0f,
        .out_limit=100.0f,
        .d_cutoff_freq= -1.0f,
        .range=-1.0f
    },

    .C6020Angle_param={
        .k=0.25f,
        .p=0.15f,
        .i=0.0f,
        .d=0.0f,
        .i_limit=0.0f,
        .out_limit=10000.0f,
        .d_cutoff_freq= -1.0f,
        .range=M_2PI
    },

    .M3508v_param={
        .k=1.0f,
        .p=1.0f,
        .i=0.0f,
        .d=0.0f,
        .i_limit=0.0f,
        .out_limit=10000.0f,
        .d_cutoff_freq= -1.0f,
        .range=-1.0f
    },

}
   


};


/**
 * @brief 获取机器人配置参数
 * @return 机器人配置参数指针
 */
Config_Param_t* Config_GetRobotParam(void) {
    return &config_chassis;
}
