question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LINEAR skin displays values below 0 on spikes

See original GitHub issue

I am currently developing a sound meter app and I noticed that the linear skin shows values below zero although I never set them below zero. I am confident the issue is in the linear skin because using the default skin, the behavior is not reproducible.

This video shows the problem: https://youtu.be/5olzrGAXjC8. Notice that the lower number is the actual value sent to the gauge. Also it looks like if you raise input volume slow enough, the problem does not exist.

I am creating the gauge like this:

gauge = GaugeBuilder.create()
                .skinType(Gauge.SkinType.LINEAR)
                .orientation(Orientation.VERTICAL)
                .title("Input")
                .returnToZero(false)
                .animated(true)
                .animationDuration(25)
                .smoothing(true)
                .needleBehavior(Gauge.NeedleBehavior.OPTIMIZED)
                .prefHeight(gaugePane.getHeight())
                .barColor(Color.CORNFLOWERBLUE)
                .build();

And I update the gauge using a PropertyChangeListener:

gaugeValueProvider.addPropertyChangeListener(gaugeValueName, event -> gauge.setValue((Double) event.getNewValue() * 100));

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
HanSolocommented, Apr 4, 2018

Ok…I’ve made a quick test and you are right…there seems to be something wrong here…will check…

0reactions
HanSolocommented, Apr 4, 2018

Ok the problem is that if the needleBehavior is set to OPTIMIZED the value for the animation will be calculated differently. This is in principle only for a gauge where the needle can rotate 360 degrees. It checks which “way” for the needle is shorter and then use the shorter way for the animation which lead to the negative values if not used in such a gauge. I think I will leave it like it is and make some comment in the code to know next time 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

NEUBrew Diagnostic and Raw Data Displays
The percentage of spikes in UV spectra are calculated for each week of the year. Green bars show the total number of UV...
Read more >
High-resolution imaging of skin deformation shows that ... - eLife
First, the models are linear, whereas the response of tactile afferents to skin deformations is known to be far more complex than accounted...
Read more >
Predicting SA-I mechanoreceptor spike times with a skin ...
This work describes the design and analysis of a skin-receptor model to predict SA-I spike times elicited by sustained indentation. The model's ...
Read more >
Pulse oximetry: Understanding its basic principles facilitates ...
Since pulse oximeters are calibrated for SpO2 between 70 and 100%, displayed values below 70% should only be considered qualitatively accurate and not ......
Read more >
electrophoresis - Molecular Weight Determination by SDS-PAGE
relative migration distance (Rf) is plotted, based on the values obtained for the bands in the MW standard. The MW of the unknown...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found