优化整定一版

This commit is contained in:
冯佳
2025-12-18 23:56:36 +08:00
parent e5eaf2172f
commit e36b4e0e27
16 changed files with 2619 additions and 504 deletions

View File

@ -6,6 +6,9 @@
#ifndef MENU_CONFIG_H
#define MENU_CONFIG_H
#include <stdint.h>
#include <stdbool.h>
/************************** 核心配置 **************************/
/**
* @brief 最大菜单节点数(静态内存,根据项目调整)
@ -30,7 +33,26 @@
/**
* @brief 是否启用调试打印(调试时开启,发布时关闭)
*/
#define MENU_CONFIG_ENABLE_DEBUG 1
#define MENU_CONFIG_ENABLE_DEBUG 0
/**
* @brief 是否启用内存监控(调试时开启,发布时关闭)
*/
#define MENU_CONFIG_ENABLE_MEM_MONITOR 1
/**
* @brief 内存使用统计结构体
*/
typedef struct {
uint16_t total_nodes; ///< 总菜单节点数
uint16_t used_nodes; ///< 已使用菜单节点数
uint16_t total_params; ///< 总参数数
uint16_t used_params; ///< 已使用参数数
uint16_t total_modbus_maps; ///< 总Modbus映射数
uint16_t used_modbus_maps; ///< 已使用Modbus映射数
uint16_t event_queue_len; ///< 事件队列长度
uint16_t event_queue_used; ///< 事件队列已使用长度
} MenuMemStats;
/************************** 功能扩展配置(可裁剪) **************************/
/**