Skip to content

Arg Constraints don't work with Float type #2

@PaHorton

Description

@PaHorton

I currently am trying to make a floating type argument that takes in a value between 0 and 31.75.

constexpr auto attnArg = ARG(ArgType::Float, 0.0, 31.75, "Attenuation");

I instantiate it using this but it will throw an error as the range struct requires integers instead of floats:

https://github.com/naszly/Arduino-StaticSerialCommands/blob/35f192ecae758a1a7fad9330ec0b512c34946d8f/src/Arg.h#L107C1-L111C3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions