Page 2 of 2

Re: Interesting MX observation.

Posted: Tue 21 Jun 2016 7:57 am
by water01
Mark does that apply to all "Gauge" users?

Re: Interesting MX observation.

Posted: Tue 21 Jun 2016 8:19 am
by mcrossley
Potentially yes, I haven't looked at what values may trigger this behaviour, but it large values are more likely to than small ones.

A better fix which keeps the 'nice scaling' is to make the change I have now put into the main gauges code...

Code: Select all

                   if (cache.maxValue !== ssGauge.getMaxValue()) {
                        ssGauge.setValue(0);
                        ssGauge.setMaxValue(cache.maxValue);
                    }
to...

Code: Select all

                    if (cache.maxValue !== ssGauge.getMaxValue()) {
                        if (ssGauge.getMaxValue() > cache.maxValue) {
                            // Gauge currently showing more than our max (nice scale effect),
                            // so reset our max to match
                            cache.maxValue = ssGauge.getMaxValue();
                        } else {
                            // Gauge scale is too low, increase it.
                            // First set the pointer back to zero so we get a nice animation
                            ssGauge.setValue(0);
                            // and redraw the gauge with the new scale
                            ssGauge.setMaxValue(cache.maxValue);
                        }
                    }

Re: Interesting MX observation.

Posted: Wed 22 Jun 2016 12:29 am
by ICP963
mcrossley wrote:OK, I just took a look at the console - it is a "niceScale thing".

Change line 137 of gauges.js to...

Code: Select all

            niceScale               : false,
fixes it.

I have changed the main gauges code base to apply a permanent fix.
I am assuming that it is in the /home/pi/CumulusMX/interface/steelseries/scripts/gauges.js file?

I changes the one on line 137 to false from true. There are several other instances of niceScale in that file that are all set to false, is that correct?

I will try that and wait for the next time we get set to BROIL, today was ONLY 112.5F and a Dew Point of 45.4. :clap: