Skip to content
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

实现浮点数和32位整数显示,解决 ListView 的频闪问题 #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

PenGoFox
Copy link

@PenGoFox PenGoFox commented Aug 7, 2024

  1. 提供多种转换方式把两个 16 位数据转换为 32 位的整数或浮点数。
    通过 app.cfg 配置文件设置转换方式,显示 32 位整数或浮点数时占用下一个寄存器的数据,下一个寄存器的数据显示为横线 -,效果如图:
    image

  2. 使用 DoubleBuffered 解决频闪问题

  3. 不再使用 timer 定时刷新寄存器数据的显示,通过 datastore 的 DataStoreWrittenTo 来通知何时刷新数据显示

  4. 设置输入地址和数量的输入框只能输入数字,在更新数据显示时检查这两个输入框的内容,限制地址和数量的值,保证后续读取列表时的索引不小于 0 且不大于 65536。使用互斥量防止出现死锁或其它问题。

  5. 更新两个 README 文件

按照特定字节顺序显示 32 位整数和 32 位浮点数
使用 DoubleBuffered 解决更新时的频闪问题
1. 寄存器查看窗口不再使用 timer 来更新数据列表
2. 调整更新数据列表策略,地址和数量输入框有变化立刻更新,
   modbus 的 datastore 有写入事件时立刻更新
3. 更新数据列表时进行互斥操作
4. 更新数据列表时限制地址和数量不超出可用范围
5. 地址和数量输入框设置只能输入数字
1. 实现多种方式转换两个数据为四字节的整数和浮点数
2. 启动时读取配置文件设置转换方式
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.

1 participant