rstrouse / nodejs-poolController-dashPanel

A dashboard panel for tagyoureit/nodejs-poolController
33 stars 20 forks source link

change air/solar temp precision to match body temp precision #76

Closed CodeSlinger69 closed 1 year ago

CodeSlinger69 commented 1 year ago

dashPanel displays air and solar temperatures with 2 decimals of precision, but bodies with one decimal of precision. this change makes all temperatures display with one decimal of precision.

CodeSlinger69 commented 1 year ago

Actually, after working with it a while, I like it better like this:

'#,##0.0'

That way if a temperature is a round number it will show as "83.0" instead of "83", and the precision and decimal won't bounce around/disappear on the interface.

There's probably half dozen of these in the bodies.js file.

rstrouse commented 1 year ago

I get the change to normalize the precision format for all the temp displays. However, I cannot change this to always display one decimal place. This will absolutely spin out everybody with an OCP. Most only show precision to the integer degree.

EDIT: I will however normalize this data to 1 optional decimal place.

SECOND EDIT: I will set this to 1 fixed decimal place for Nixie controllers and 0 decimal places for OCPs.

rstrouse commented 1 year ago

Filter pressures should be displayed in 2 decimal places as this precision allows for kPa displays.

CodeSlinger69 commented 1 year ago

Awesome, thanks for this, and I understand your reasoning. As an aside, it almost feels like the OCP version of nsjPC should be separate from the Nixie version, eh? I understand there is some shared code, but our discussions seem to be revolving around the limitations of the OCPs quite a bit.

rstrouse commented 1 year ago

I have pushed the changes to accommodate all of the temp precision based upon the controller type.