Skip to content

Slider markings #18

@dpharris

Description

@dpharris

The way tics are marked now they are calculated from th slow end of the range. For example, if the range is 0-20, and the tics division is 5, then the tics are at 0,5,10,15,20 -- this is nice.

However, if the range is 2-20 then the tics are at: 2,7,12,17, which is not as nice.

Would you be accepting of a PR that changed this so the second example showed: 2,5,10,15,20? Where the tics land on multiples of the tic division?

Secondly, sometimes it would be helpful if the slider markings were separate from the values read.
For example, servos are often driven by PWM, and the maximum resolution is desired, either 8bits 0-255 or 16-bits 0-2500, but it is better to show the display values as running from 0 to 180 degrees.
Would you be accepting of a PR that let the display values and tics be over one range, but the reported value be over a different range? This would require more parameters and may get into problems with unequal steps for the reported values.

Thanks.

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