ValueGauge

The ValueGauge displays a numeric value from any attribute. It has options for setting the justification, number of decimal places, and dividing down the number to make a representative value from the raw data sent by Speeduino.

Here is an example definition for battery voltage:

<gauge>
    <name>batteryvvalue</name>
    <type>ValueGauge</type>
    <x>132</x>
    <y>168</y>
    <w>50</w>
    <h>20</h>
    <min>0</min>
    <max>250</max>
    <initial>199</initial>
    <divideby>10</divideby>
    <decimalplaces>1</decimalplaces>
    <fontsize>18</fontsize>
    <attribute>batteryv</attribute>
    <colours>blackwhite</colours>
    <visible>1</visible>
    <units>v</units>
    <justification>left</justification>
</gauge>
Attribute Mandatory? Value Type Description
x Yes Integer x coordinate of the gauge
y Yes Integer y coordinate of the gauge
w Yes Integer Width of the gauge. The gauge value may sometimes be drawn outside the specified bounds, but w comes into play when Justification other than left is being used.
h Yes Integer Height of the gauge. The gauge value may sometimes be drawn outside the specified bounds.
min Yes Integer The minimum value of the gauge. In some circumstances this value may be ignored.
max Yes Integer The maximum value of the gauge. In some circumstances this value may be ignored.
initial Yes Integer Initial value of the gauge to be used before any data has been received.
divideby Yes Floating point The gauge’s raw value will be divided by this number before being displayed. If you do not want to perform any division, then specify 0 here. You can divide by values less than 1 to perform multiplication.
fontsize Yes Integer Size of the font to be used when drawing the value.
attribute Yes String The name of the ECU attribute that you want to render.
visible No Integer 1 or 0 Whether the gauge should be initially visible or not. If not specified, the gauge will be visible
units Yes String The units to be displayed after the value. e.g. you might want to write “kPa” after the manifold pressure. If you do not want any units, leave the value empty but it is mandatory.
justification No String, valid values left, right, center, centre Horizontal justification of the value inside the bounding box. Default justification is left.
delta No Integer A value to either subtract or add to the raw value. Note that for IAT or CLT attributes, the system automatically sets the delta to -40. The delta is always added, so to subtract specify a negative value.
numdigits No Integer Specifies a fixed number of digits to display. IF the number of digits required to display the value is less than the number specified here, then the value will be padded with zeroes from the left.
decimalplaces No Integer Specifies the number of decimal places to use when displaying the value. Decimal places are in addition to numdigits. If not specified, the number will be formatted to however decimal places are required so it is usual to specify it if dividing the raw value down.
modulo No Integer The modulo value is applied to the number before it is divided by the “divideby” setting. The complete calculation is: Value = ((RawValue mod Modulo) / DivideBy) + FDelta. Uses for modulo are limited but one example is to implement a trip counter that wraps around to zero as it would if it were an old-style analog trip inside a speedo.
colours No String States what colours to use. If no colours are specified, the gauge will be white text on a black background. See the help on Colour Strings for further details on how to specify this.
colours_script No String An alternative way of determining the display colour by supplying a PascalScript script. See the Colour Strings page for further details on this too.
boolean_script No String This setting enables you to create a PascalScript function that returns a true or false value which in turn is effectively assigned to the visible property of the control. In other words if there is a boolean script and that script returns true then the gauge will be drawn on screen. Otherwise it will not be drawn.