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
Conversation
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>
@@ -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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
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
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>
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>
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