Adjust Pure version info display && Adjust Pure version menu functions.#135
Adjust Pure version info display && Adjust Pure version menu functions.#135lihuanhuan merged 2 commits intoOneKeyHQ:masterfrom
Conversation
WalkthroughThe pull request replaces hardcoded device model strings with two new constants and updates menu initialization based on hardware version. In the configuration file, the function now returns either a "pure" or "classic" constant based on a hardware check. In the menu file, a new pure settings menu array is introduced alongside a function that switches menu items depending on the hardware. Additionally, a needed header is included for Bluetooth verification. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant config_get_device_model
participant ble_hw_ver_is_pure
Caller->>config_get_device_model: Request device model
config_get_device_model->>ble_hw_ver_is_pure: Check hardware version
ble_hw_ver_is_pure-->>config_get_device_model: Return true/false
config_get_device_model-->>Caller: Return DEVICE_MODEL_PURE or DEVICE_MODEL_CLASSIC
sequenceDiagram
participant Caller
participant menu_init_settings_menu
participant ble_hw_ver_is_pure
Caller->>menu_init_settings_menu: Initialize settings menu
menu_init_settings_menu->>ble_hw_ver_is_pure: Check hardware version
ble_hw_ver_is_pure-->>menu_init_settings_menu: Return true/false
menu_init_settings_menu-->>Caller: Set menu items to pure or default array
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Definitions (1)legacy/firmware/menu_list.c (6)
🪛 Cppcheck (2.10-2)legacy/firmware/config.c[style] 378-378: The function 'config_get_device_model' is never used. (unusedFunction) [style] 383-383: The function 'config_getLabel' is never used. (unusedFunction) legacy/firmware/menu_list.c[style] 699-699: The function 'menu_default' is never used. (unusedFunction) ⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (7)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit