forked from thelsing/knx
-
Notifications
You must be signed in to change notification settings - Fork 8
Fix Sending Wrong Values on Failed Conversion to DPT #30
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
Merged
Conversation
This file contains hidden or 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 was referenced Nov 2, 2024
mgeramb
reviewed
Nov 9, 2024
…ersion to DPT Remove _valueNoSend(..) as valueNoSend(..) is now the same
Member
|
please add a short description in the Changelog about this |
Ing-Dom
added a commit
that referenced
this pull request
Jul 3, 2025
* fix: only set pinMode of Prog button pin when pin is >= 0 and isr function is defined otherwise it is useless anyway and causes warnings. * String \0 terminated in group objects (#25) * String \0 terminated in group objects * Remove copy constructor, fix bugs in setting buffer to 0 * Remove copy constructor in GroupObject * remove generic ethernet support on rp2040. uses now KNX_IP_LAN or KNX_IP_WIFI * update rp2040 plattform version in examples and ci * Better Routing and new Tunneling Support (#26) Support 0x091A IP-Router better, including KNX IP Tunneling and a lot of smaller fixes * add DPT 27.001 * Prevent using inadvertently copy constructor of GroupObject * V2.1.1 (rq queue bugfix) * prepare README.md - add current changes * increase device object api version to 2 (invalidation of knx flash data stored by older versions) neccessary due to changes to TableObject.save and restore for router (0x091A) support * add #pragma once to Arduino plattform to allow derived plattforms * Fix Sending Wrong Values on Failed Conversion to DPT (#30) * Fix `valueNoSendCompare`: DPT Conversion Fail Resulted in Setting KO to 0 * Fix `valueNoSend`: Do NOT End KO Uninitialized when Value Conversion Failed * Fix: Do NOT Send when Updating KO Failed on Value Conversion * Group-Object Value Update: Return Indication for Success/Fail of Conversion to DPT * Update Changelog: #30 Fix and Signature Change of `GroupObject` Value Update * adapt esp plattform using KNX_NETIF * add changelog * fix some bugs in tunneling support detected by the usage of esp32 (heap corruption) * Fix casing of ETH in include * fix Bau091A:IsAckRequired for Broadcasts * fix bug in res tunnel feature * remove debug printf * fix searchResponseExtended DHCP, prints, length * fix getting MAC-Address from ipstack in rp2040 and ESP plattform * pack CC1310 example to reduce filecount * fix data port selection for IP tunneling * new tpuart implementation (#34) new tpuart implementation * enhance multicast setup with network interface check and initialization message * suppress unused variable warning in multicast setup * cleanup examples and ci pipeline * - use tpuart lib 1.0.0 - filter echoed and repeated inbound frames * adds: disable repitions filter on router * fix doNotRepeat flag not correctly propagated to link layer * use TPuart lib 1.0.1 * adapt README.md * prepare V2.2.0 --------- Co-authored-by: Michael Geramb <lasso_riefen0m@icloud.com> Co-authored-by: Marco Scholl <develop@marco-scholl.de> Co-authored-by: Cornelius Köpp <121643070+cornelius-koepp@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Setting a value which cannot be converted to the given DPT did result in unexpected behaviour.
valueNoSendCompare/valueCompareresulted in value 0 (and returned change based on this value)valueNoSendupdated state from unitialized to OK, without updating the valuevaluewrote to GA without setting the KO valueReproduce
For all cases use a value/type combination which results in
KNX_Encode_Valuereturnfalse.Example: value
500with typeDPT_Value_1_Ucount, or any otherNote: DPT1 will not fail; ignoring all other bits.
valueNoSendCompare/valueCompare: did always set value to 0 (no special preconditions needed beside conversion fail)valueNoSend: use before any other change of KO. No change in value expected, but read requests will answered (with undefined value)valueuse before any other change of KO. Will result in write telegram (with other value included)Fix
Suppress updating, status-update and sending for invalid values.
To Discuss
The fix does not change the public interface for changing/writing KO values, so there will be no feedback if conversion fails. Current methods return type
voidcould be changed toboolto indicate success, without breaking.