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

[lcn] add workaround for dynamic text firmware bug #9232

Merged
merged 1 commit into from Dec 5, 2020

Conversation

fwolter
Copy link
Member

@fwolter fwolter commented Dec 4, 2020

Some LCN-GTxD don't display the text if it fits exactly in one chunk (12 bytes). Observed with GT10D 8.0.

Closes #9208

Signed-off-by: Fabian Wolter github@fabian-wolter.de

Some LCN-GTxD don't display the text if it fits exactly in one chunk (12 bytes). Observed with GT10D 8.0.

Closes openhab#9208

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
@fwolter fwolter added the bug An unexpected problem or unintended behavior of an add-on label Dec 4, 2020
@@ -125,6 +125,11 @@ public void sendDynamicText(
text = new String();
}

// some LCN-GTxD don't display the text if it fits exactly in one chunk. Observed with GT10D 8.0.
if (text.getBytes(LcnDefs.LCN_ENCODING).length % DYN_TEXT_CHUNK_LENGTH == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default charset varies from system to system so it is better to specify it yourself instead of using the default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LcnDefs.LCN_ENCODING is set to StandardCharsets.UTF_8.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...I have no idea why I didn't notice that.

@@ -125,6 +125,11 @@ public void sendDynamicText(
text = new String();
}

// some LCN-GTxD don't display the text if it fits exactly in one chunk. Observed with GT10D 8.0.
if (text.getBytes(LcnDefs.LCN_ENCODING).length % DYN_TEXT_CHUNK_LENGTH == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...I have no idea why I didn't notice that.

@cpmeister cpmeister added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Dec 4, 2020
@cpmeister cpmeister merged commit 86bd264 into openhab:main Dec 5, 2020
@cpmeister cpmeister added this to the 3.0.0.M5 milestone Dec 5, 2020
@fwolter fwolter deleted the lcn-dyn branch December 18, 2020 19:25
nowaterman pushed a commit to nowaterman/openhab-addons that referenced this pull request Jan 19, 2021
Some LCN-GTxD don't display the text if it fits exactly in one chunk (12 bytes). Observed with GT10D 8.0.

Closes openhab#9208
boehan pushed a commit to boehan/openhab-addons that referenced this pull request Apr 12, 2021
Some LCN-GTxD don't display the text if it fits exactly in one chunk (12 bytes). Observed with GT10D 8.0.

Closes openhab#9208

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
Some LCN-GTxD don't display the text if it fits exactly in one chunk (12 bytes). Observed with GT10D 8.0.

Closes openhab#9208

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lcn] sendDynymicText does not work if strings have 12, 24, 36 characters
2 participants