Skip to content

Incorrect min/max defaults for temperature #1615

@hasty

Description

@hasty

When only min or max is defined for an attribute, the generated value in GENERATED_MIN_MAX_DEFAULTS for the omitted limit does not seem to account for whether or not the underlying value is signed.

e.g.:

-    <attribute side="server" code="0x0011" name="OccupiedCoolingSetpoint" define="OCCUPIED_COOLING_SETPOINT" type="temperature" min="-27315" max="0x7FFF" writable="true" default="2600" optional="true">
+    <attribute side="server" code="0x0011" name="OccupiedCoolingSetpoint" define="OCCUPIED_COOLING_SETPOINT" type="temperature" min="-27315" writable="true" default="2600">

yields

-        { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */                                 \
+        { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0xFFFF }, /* OccupiedCoolingSetpoint */     

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To Do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions