CM_DOG/User/module/config.h
2025-06-26 05:11:10 +08:00

55 lines
1.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 配置相关
* 读写在FALSH上的信息
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "component/cmd.h"
#include "device/bmi088.h"
#include "device/go.h"
#include "module/chassis.h"
/* 机器人参数,保存后不会变化 */
// typedef struct {
// CMD_RobotModel_t model; /* 型号 */
// Chassis_Params_t chassis; /* 底盘 */
// Gimbal_Params_t gimbal; /* 云台 */
// Shoot_Params_t shoot; /* 射击 */
// GO_UART_Params_t uart;
// } Config_RobotParam_t;
/* 机器人配置保存在Flash上的信息根据机器人变化 */
typedef struct {
// char robot_param_name[20];
// char pilot_cfg_name[20];
// const Config_RobotParam_t *robot_param;
const GO_UART_Params_t uart;
/* 底盘参数 */
const Chassis_Params_t chassis;
struct {
BMI088_Cali_t bmi088;
} cali; /* 校准 */
Chassis_ImuType_t chassis_imu_type; /* 底盘IMU类型 */
} Config_t;
/**
* \brief 从Flash读取配置信息
*
* \param cfg 配置信息
*/
void Config_Get(Config_t *cfg);
#ifdef __cplusplus
}
#endif