Announcement

Collapse
No announcement yet.

Customdigits and negative value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customdigits and negative value

    Hello,

    I am working with some Customdigits, and so far everything is great.

    I now come accross an issue, which is displaying a negative number.

    I need to show a value between -8 and +8. I don't really need the '+' sign, but I do need the '-' when the value is below 0.
    My digit is configured with 3 digits, non-leading zeros, with the following pattern.
    But whenever I call ledDigitsDisplay() with a value below zero, I do not get the result I am expeting.
    Click image for larger version

Name:	numbers_dotted_non-leading_32p.png
Views:	47
Size:	693 Bytes
ID:	66591

    ledDigitsDisplay(-8, iiCustomdigits25, 724, 3, 1, 16, 1) ;
    -> 528 is displayed

    ledDigitsDisplay(-5, iiCustomdigits25, 724, 3, 1, 16, 1) ;
    -> 531 is displayed


    Is there any way to get this working, or is the Customdigits just not meant for negative values ?

    Thanks .


  • #2
    Hello Vincent,

    Please ensure that the necessary configuration is toggled under the project tab.

    Click image for larger version

Name:	Capture.PNG
Views:	39
Size:	22.9 KB
ID:	66597

    After that, please ensure that "ledDigitsDisplay -ve.inc" is included on your project.

    This application note might also be helpful.

    You could skip to Displaying Negative Values.

    I hope this helps.

    Best regards,
    Michael

    Comment


    • #3
      Hi Michael

      Here is the part I was missing. I was including the old/basic "ledDigitsDisplay.inc"

      Originally posted by michael_4D View Post

      After that, please ensure that "ledDigitsDisplay -ve.inc" is included on your project.
      Thanks for the quick response !



      Comment

      Working...
      X