Skip to content

Fix decoding of "UTF-8" registers#11

Open
lowar wants to merge 1 commit intobohdan-s:mainfrom
lowar:fix_utf-8_register_decode
Open

Fix decoding of "UTF-8" registers#11
lowar wants to merge 1 commit intobohdan-s:mainfrom
lowar:fix_utf-8_register_decode

Conversation

@lowar
Copy link
Copy Markdown

@lowar lowar commented Oct 27, 2024

This patch fixes the decoding of UTF-8 values ("serial_number", "dsp_software_version", "arm_software_version")

Since the expected length of the value is not known at decoding time, the maximum length of the string needs to be provided in the "register-sungrow.yaml" as a "length" key with the "UTF-8" datatype:

     - name: "serial_number"
       level: 3
       address: 4990
       datatype: "UTF-8"
       length: 10

Downward compatibility is ensured by using a default length of 5.

@lowar
Copy link
Copy Markdown
Author

lowar commented Jul 13, 2025

This would fix issue #8

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