Skip to main content Link Menu Expand (external link) Document Search Copy Copied

<page> sections

The <page> section is used to define a single page. Multiple page sections can be defined under the <pagelist> section to define an entire cluster with multiple pages.

In addition, the <page> entry can contain Composite Pages which is where one or more pages can be embedded inside another page.

Each page consists of a page number, a page name, optional composites and warnings, and a set of gauges.

Attributes:

Sub nodes:

<pagenumber\>0</pagenumber>

This defines the page number being described. The example above defines page number 0. Page numbers must start at 0, and there must be no gaps so if you have 5 pages, they must be numbered 0 to 4. Page order in the file is important because this dictates the page you will land on when ‘next page’ and ‘previous page’ actions are taken (for example via a hardware button connected to the Pi).

<pagescript>trackpagescript.pas</pagescript>

This optionally defines a script that will be executed just before each frame is drawn. For further details on this please see the Scripts section.

<gauges>
</gauges>

This node defines the collection of gauges that are to be included on the page. Each gauge has a set of attributes associated with it which are dependent on the type of gauge. For example a boolean gauge (on or off) may have on and off bitmaps, and also needs to be told which data item or script determines its value. Whereas a needle gauge will have settings relating to the rotation of the needle, the bitmaps to draw for background and needle, and the range of the data as well as which attribute to use (e.g. RPM).

Each gauge is specified as follows:

<gauge>
</gauge>

Here is an example gauge definition taken from my own vehicle:

<gauge>
    <name>afrvalue</name>
    <type>ValueGauge</type>
    <x>183</x>
    <y>287</y>
    <w>50</w>
    <h>20</h>
    <min>0</min>
    <max>250</max>
    <initial>199</initial>
    <divideby>10</divideby>
    <decimalplaces>1</decimalplaces>
    <fontsize>70</fontsize>
    <attribute>o2</attribute>
    <colours>blackwhite</colours>
    <visible>1</visible>
    <units></units>
    <justification>right</justification>
</gauge>

This example displays the current AFR value on the screen at a specific location using the ‘o2’ attribute (this is the AFR value as sent by Speeduino). When speeduino sends the AFR it does so using an integer value (range 0 to 255) where 125 would mean an AFR of 12.5 - in other words the value is multiplied by 10. Therefore this gauge specifies that the value should be displayed at 1 decimal place and be divided by 10.

For details of each gauge type, See the Gauge Types section

Some attributes in certain gauges are mandatory, others are optional. Where a mandatory value is missing, the gauge won’t be initialised and if possible an error message will be reported to the application’s log file.