refactor(gbk_text): 重构GBK文本常量定义并优化命名

移除过时的文本定义,使用更简洁通用的名称替换原有特定功能的文本
常量,并更新相应的长度定义和别名映射。

BREAKING CHANGE: 原有的特定功能文本常量已被移除,需使用新的通
用名称进行访问。
```
This commit is contained in:
2026-02-17 18:55:34 +08:00
parent 09c881b4a6
commit 4c37261cc8
12 changed files with 958 additions and 509 deletions

View File

@@ -5,68 +5,47 @@
// GBK文本数组声明定义在gbk_text.c中
extern const uint8_t text_device_name_GBK[];
extern const uint8_t text_device_loading_GBK[];
extern const uint8_t text_start_massage_GBK[];
extern const uint8_t text_start_heating_GBK[];
extern const uint8_t text_stop_massage_GBK[];
extern const uint8_t text_stop_heating_GBK[];
extern const uint8_t text_massage_gear_1_GBK[];
extern const uint8_t text_massage_gear_2_GBK[];
extern const uint8_t text_massage_gear_3_GBK[];
extern const uint8_t text_massage_time_10_GBK[];
extern const uint8_t text_massage_time_15_GBK[];
extern const uint8_t text_massage_time_20_GBK[];
extern const uint8_t text_massage_time_30_GBK[];
extern const uint8_t text_massage_time_cont_GBK[];
extern const uint8_t text_remaining_time_GBK[];
extern const uint8_t text_heating_on_GBK[];
extern const uint8_t text_heating_off_GBK[];
extern const uint8_t text_massage_running_GBK[];
extern const uint8_t text_massage_paused_GBK[];
extern const uint8_t text_massage_ended_GBK[];
extern const uint8_t text_loading_GBK[];
extern const uint8_t text_massage_on_GBK[];
extern const uint8_t text_massage_off_GBK[];
extern const uint8_t text_heat_on_GBK[];
extern const uint8_t text_heat_off_GBK[];
extern const uint8_t text_gear_GBK[];
extern const uint8_t text_time_GBK[];
extern const uint8_t text_cont_GBK[];
extern const uint8_t text_remaining_GBK[];
extern const uint8_t text_running_GBK[];
extern const uint8_t text_paused_GBK[];
extern const uint8_t text_ended_GBK[];
// GBK文本长度宏预计算不含\0
#define text_device_name_LEN (10)
#define text_device_loading_LEN (20)
#define text_start_massage_LEN (10)
#define text_start_heating_LEN (10)
#define text_stop_massage_LEN (10)
#define text_stop_heating_LEN (10)
#define text_massage_gear_1_LEN (13)
#define text_massage_gear_2_LEN (13)
#define text_massage_gear_3_LEN (13)
#define text_massage_time_10_LEN (16)
#define text_massage_time_15_LEN (16)
#define text_massage_time_20_LEN (16)
#define text_massage_time_30_LEN (16)
#define text_massage_time_cont_LEN (14)
#define text_remaining_time_LEN (18)
#define text_heating_on_LEN (12)
#define text_heating_off_LEN (12)
#define text_massage_running_LEN (8)
#define text_massage_paused_LEN (12)
#define text_massage_ended_LEN (12)
#define text_loading_LEN (6)
#define text_massage_on_LEN (8)
#define text_massage_off_LEN (8)
#define text_heat_on_LEN (8)
#define text_heat_off_LEN (8)
#define text_gear_LEN (4)
#define text_time_LEN (6)
#define text_cont_LEN (4)
#define text_remaining_LEN (8)
#define text_running_LEN (6)
#define text_paused_LEN (6)
#define text_ended_LEN (6)
// 兼容旧代码的别名
#define text_device_name text_device_name_GBK
#define text_device_loading text_device_loading_GBK
#define text_start_massage text_start_massage_GBK
#define text_start_heating text_start_heating_GBK
#define text_stop_massage text_stop_massage_GBK
#define text_stop_heating text_stop_heating_GBK
#define text_massage_gear_1 text_massage_gear_1_GBK
#define text_massage_gear_2 text_massage_gear_2_GBK
#define text_massage_gear_3 text_massage_gear_3_GBK
#define text_massage_time_10 text_massage_time_10_GBK
#define text_massage_time_15 text_massage_time_15_GBK
#define text_massage_time_20 text_massage_time_20_GBK
#define text_massage_time_30 text_massage_time_30_GBK
#define text_massage_time_cont text_massage_time_cont_GBK
#define text_remaining_time text_remaining_time_GBK
#define text_heating_on text_heating_on_GBK
#define text_heating_off text_heating_off_GBK
#define text_massage_running text_massage_running_GBK
#define text_massage_paused text_massage_paused_GBK
#define text_massage_ended text_massage_ended_GBK
#define text_loading text_loading_GBK
#define text_massage_on text_massage_on_GBK
#define text_massage_off text_massage_off_GBK
#define text_heat_on text_heat_on_GBK
#define text_heat_off text_heat_off_GBK
#define text_gear text_gear_GBK
#define text_time text_time_GBK
#define text_cont text_cont_GBK
#define text_remaining text_remaining_GBK
#define text_running text_running_GBK
#define text_paused text_paused_GBK
#define text_ended text_ended_GBK
#endif // __GBK_TEXT_H__