forked from kellerza/sunsynk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance helper functions for register value manipulation
- Added `make_32bit` and `split_to_16bit` functions to facilitate conversion between 16-bit and 32-bit register values using struct packing. - Updated `value_to_reg` method in `NumberRWSensor` to utilize `split_to_16bit` for handling two 16-bit addresses. - Modified `reg_to_value` method in `Sensor` class to use `make_32bit` for combining two 16-bit registers into a single 32-bit value, improving support for signed values.
- Loading branch information
1 parent
4bf51f2
commit 861954b
Showing
3 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters