Skip to content

Implement the battery percentage update function and optimize the display color when the battery is low. #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from

Conversation

waahah
Copy link

@waahah waahah commented Mar 18, 2025

feat(display): 更新显示屏接口以支持电池百分比显示

  • 实现电池百分比更新函数,优化低电量时的显示颜色
  • 在状态栏添加电池百分比标签
  • 在 SetupUI 函数中创建电池百分比标签对象
  • 在 LcdDisplay 类中添加 UpdateBatteryPercentage 虚函数
  • 添加 percent_label_ 成员变量用于显示电池百分比
  • 在 Display 类中新增 UpdateBatteryPercentage 方法
  • 在 Update 方法中调用 UpdateBatteryPercentage 更新电池百分比显示

waahah added 4 commits March 19, 2025 05:07
- 在 Display 类中新增 UpdateBatteryPercentage 方法
- 在 Update 方法中调用 UpdateBatteryPercentage 更新电池百分比显示
- 在 display.h 文件中添加了 UpdateBatteryPercentage 虚函数
- 此函数允许设置电池百分比,增加了对电池状态显示的支持
- 在状态栏添加电池百分比标签
- 实现电池百分比更新函数,优化低电量时的显示颜色
- 在 SetupUI 函数中创建电池百分比标签对象
- 在 LcdDisplay 类中添加 UpdateBatteryPercentage 虚函数
- 添加 percent_label_ 成员变量用于显示电池百分比
- 更新构造函数,初始化 percent_label_ 为 nullptr
@78
Copy link
Owner

78 commented Mar 19, 2025

timer里的函数,可以TaskDelay的??

@waahah
Copy link
Author

waahah commented Mar 19, 2025

@78 修改了,请查看最新提交

@78
Copy link
Owner

78 commented Apr 12, 2025

考虑到无法兼容atoms3r或其他0.85寸屏幕的硬件,暂时不把这个作为必须选项。

@78 78 closed this Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants