Feature Request: decimal places in the Digital Counter control
Feature Request: decimal places in the Digital Counter control
It would be really helpful to also allow decimal places in the Digital Counter control, just as a fixed number of decimal places together with the number of digits displayed.
-
- Posts: 4
- Joined: Wed Apr 08, 2020 10:32 am
Re: Feature Request: decimal places in the Digital Counter control
How did you get around this limitation? Because you do have decimal points in modules like DualVolt meter. Editable text or something?
Great modules by the way
Great modules by the way
Re: Feature Request: decimal places in the Digital Counter control
This was done by a combination of custom skins for the Digital Counter (with wider spacing), an image for the decimal place, and coding of a function to display this all, including things like alphanumerics so it can also show "Error" (or "Err" in limited space). On some, I've cheated and included some simple text (in Red) on the black background - whether this is for more complex alphanumerics like Note Names or for labels such as BPM, etc.
With the skin, the function, the image and the use of text, it is all pretty easy (but a bit "faffy").... but a combination of having decimal places in the standard displays, and also having access to a font such as Segment14 (https://www.1001fonts.com/segment14-font.html) for use in a Text box would make this all a lot easier and more flexible.
With the skin, the function, the image and the use of text, it is all pretty easy (but a bit "faffy").... but a combination of having decimal places in the standard displays, and also having access to a font such as Segment14 (https://www.1001fonts.com/segment14-font.html) for use in a Text box would make this all a lot easier and more flexible.
-
- Posts: 4
- Joined: Wed Apr 08, 2020 10:32 am
Re: Feature Request: decimal places in the Digital Counter control
Ah yeah Voltmeter "breaks" at 999V.
So effectively in Voltmeter you are converting the incoming signal into an 8 digit integer and moving the decimal point (which is like a sprite) around according to where it should be? That sounds like quite a bit of "work" for something so common I guess I'll have to practice JAVA a bit more to get into those sorts off things
So effectively in Voltmeter you are converting the incoming signal into an 8 digit integer and moving the decimal point (which is like a sprite) around according to where it should be? That sounds like quite a bit of "work" for something so common I guess I'll have to practice JAVA a bit more to get into those sorts off things
Re: Feature Request: decimal places in the Digital Counter control
The basics are sort of simple in approach (I like simple). I fixed the decimal place for the displays (makes it easier), format the number as a fixed decimal place string (or create the string that I want to display), using fixed length everything so that the formatted number was either left or right justified by adding spaces to the left or right - and then loop through the characters in the string which then get put up on the display. To do this actual display, I created a set of (from memory) static lists for the characters I wanted to use, and use a Switch/Case structure to get the correct info to put on the display.
But agree - quite a lot of work for a use case that is not that unusual, which is why the feature request as this would make it a lot easier for many other developers (and I'd probably refactor my code to make use of this - always nice to simplify stuff).
But agree - quite a lot of work for a use case that is not that unusual, which is why the feature request as this would make it a lot easier for many other developers (and I'd probably refactor my code to make use of this - always nice to simplify stuff).