Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
提供多种转换方式把两个 16 位数据转换为 32 位的整数或浮点数。
![image](https://private-user-images.githubusercontent.com/22422756/355693515-7414bfca-940e-4122-adf5-1096eb47a976.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwNzg5OTEsIm5iZiI6MTcyNjA3ODY5MSwicGF0aCI6Ii8yMjQyMjc1Ni8zNTU2OTM1MTUtNzQxNGJmY2EtOTQwZS00MTIyLWFkZjUtMTA5NmViNDdhOTc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDE4MTgxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY3ZDg5YmE3NWRlMjY1Mzk3ODFhMDVkMzkwM2Y4YjJmNWU2OGZkZDQxNTY2YTdiOTg1M2Y5MTdlNDY2YmE1OTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JFC0IPwYrcnzACk2NBc8wR-xlrTOpzgJjAq5xV38UVw)
通过
app.cfg
配置文件设置转换方式,显示 32 位整数或浮点数时占用下一个寄存器的数据,下一个寄存器的数据显示为横线-
,效果如图:使用
DoubleBuffered
解决频闪问题不再使用 timer 定时刷新寄存器数据的显示,通过 datastore 的
DataStoreWrittenTo
来通知何时刷新数据显示设置输入地址和数量的输入框只能输入数字,在更新数据显示时检查这两个输入框的内容,限制地址和数量的值,保证后续读取列表时的索引不小于 0 且不大于 65536。使用互斥量防止出现死锁或其它问题。
更新两个 README 文件