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

DPT 1.24 and 1.100 missing #225

Open
wolfib77 opened this issue Dec 7, 2022 · 0 comments
Open

DPT 1.24 and 1.100 missing #225

wolfib77 opened this issue Dec 7, 2022 · 0 comments

Comments

@wolfib77
Copy link

wolfib77 commented Dec 7, 2022

Hi,
the DPT 1.024 and 1.100 are missing in dpdconvert.cpp:

int KNX_Decode_Value(uint8_t* payload, size_t payload_length, const Dpt& datatype, KNXValue& value) 
{
    if (payload_length > 0)
    {
        // DPT 1.* - Binary
        if (datatype.mainGroup == 1 && datatype.subGroup >= 1 && datatype.subGroup <= 23 && datatype.subGroup != 20 && !datatype.index)
        {
...

int KNX_Encode_Value(const KNXValue& value, uint8_t* payload, size_t payload_length, const Dpt& datatype)
{
    if (datatype.mainGroup == 1 && datatype.subGroup >= 1 && datatype.subGroup <= 23 && datatype.subGroup != 20 && !datatype.index)
        return valueToBusValueBinary(value, payload, payload_length, datatype);
...

Additionally the warning in dpt.cpp is not correct for DPT 16.000

Dpt::Dpt(short mainGroup, short subGroup, short index /* = 0 */)
    : mainGroup(mainGroup), subGroup(subGroup), index(index)
{
    if (subGroup == 0)
        println("WARNING: You used and invalid Dpt *.0");

I would be happy if you could fix it.
Kind regards

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

No branches or pull requests

1 participant