Theme configs are located in the etc/themes
directory. Each module
( Radial, Ellipse, Linear ect ) has its own set of theme configs.
These configs are used to add labels to guages.
Components of theme config:
{
"degrees": 120,
"labels":
[
{
"pos": [10, -5], "font_size": 20, "default": "Max: ", "data": 1
},
{
"pos": [-10, -5], "font_size": 20, "default": "Min: ", "data": 1
},
{
"pos": [0, 14], "font_size": 25, "default": "", "data": 1
},
{
"pos": [0, 8], "font_size": 18, "default": "__PID__"
}
]
}
The components of a theme config vary from module to module but follow a general set of rules:
degrees
: This value is used in radial and elliptical gauges to state the number of degrees that a needle can rotate. This is important in setting the step
value for needle rotation.
labels
: This is an array of dictionaries that determine the positon, size and content of labels for eadh theme. The important part to remember here is that position is a % value. Ie pos [25, 0] is equal to 25% of the width of the gauge to the right -> and at the center point for the Y.