Dial (Pot)

Pot View Pot View

The Pot View provides a mouse-adjustable dial for editing channel and option values.  Additionally it is possible to add scripting to the control in order to provide more complex control of values.

A channel or option may be selected using the box underneath the dial.  If the selected object is a map modifier then the program button will be visible.  Clicking on the button will perform the same action that the virtual pot box program button does by applying the adjustment to the current map site and resetting the channel to zero.

The label, object selector and program button visibility may be overridden by setting the appropriate Properties Window. Additionally the text of the label may be set via the 'Label' property.  If the property is left blank then it will be set to the name of the selected object unless a script is specified.

If a script is specified for the control then the object selector will be disabled since the script is mutually exclusive.  To disable the script, see the 'Enable Script' property.

If the script defines a function called 'onProgramButton' then the program button will be visible and call that script function when clicked.

Scripts may define the following functions:

  • onGetMin(): Allows the minimum value for the pot control to be specified.
  • onGetMax(): Allows the maximum value for the pot control to be specified.
  • onGetValue(): Should return the current value of the pot control.
  • onSetValue(value): Will be called when the value of the pot control has been adjusted by the user or implicitly.
  • onProgramButton(): Will be called if the program button is clicked by the user.

View Properties

Properties editable via the properties editor.

PropertyScript IDDescription
Title title The title of the window.
Script ID id The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts.
Tool Tip tooltip Window tool tip.
Display Units display_units_text Show units after the number on the view.
Display Units (Label) display_units_label Show units after the label on the view.
Prefix Text prefix_text Text to display before the value.
Postfix Text postfix_text Text to display after the value.
Limits limits Set up alarm limits for this gauge.
Show Value show_value
Show Label show_label
Label Font label_font
Value Font value_font
Value Height % value_height_percent A value of zero disables auto font size fitting if Value Height Max is set
Value Height Max [dp] value_height_max_dp Maximum font height of the value text, in device pixels
Label Height % label_height_percent
Label Height Max [dp] label_height_max_dp Maximum font height of the label, in device pixels
Label Text label_text
Label Align label_align
Label Vertical Align label_valign
Value Align value_align
Value Vertical Align value_valign
Low Limit Text low_limit_text
High Limit Text high_limit_text
Value Override Text value_text
Max length Text max_length_text Leave blank for auto
Background bg_colour Background colour
Text text_colour Text colour
Alarm Low Background alarm_low_bg_colour Alarm Lower Limit Background colour
Alarm Low Text alarm_low_text_colour Alarm Lower Limit Text colour
Alarm High Background alarm_high_bg_colour Alarm Upper Limit Background colour
Alarm High Text alarm_high_text_colour Alarm Upper Limit Text colour
Input Value parameter The source of the value that will be displayed by the gauge.
Update Rate update_rate Rate at which the input value is requested from the ECU.
Decimal Places decimal_places Set to -1 for auto