Module dash
dash module
Functions
Tables
| create_object_params | create_object parameters |
| create_box_params | create_box parameters |
| create_label_params | create_label parameters |
| create_image_params | create_image parameters |
| create_line_params | create_line parameters |
| create_circle_params | create_circle parameters |
| create_triangle_params | create_triangle parameters |
| create_graph_params | create_graph parameters |
| telemetry | Telemetry table. |
| font | Font table. |
| image | Image table. |
| wheel | Wheel table. |
| sim | Sim table. |
| unit | Unit table. |
| led | Led table. |
Functions
- update ()
- Update the dash. Should be called repeatedly to refresh the screen
- uptime ()
-
Get uptime
Returns:
-
int
uptime in milliseconds
- create_object (parent_obj, params)
-
Create new dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_object_params
Returns:
-
DashObject
a new dash object
- create_box (parent_obj, params)
-
Create new box dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_box_params
Returns:
-
DashObject
a new dash box object
- create_label (parent_obj, params)
-
Create new label dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_label_params
Returns:
-
DashObject
a new dash label object
- create_image (parent_obj, params)
-
Create new image dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_image_params
Returns:
-
DashObject
a new dash image object
- create_line (parent_obj, params)
-
Create new line dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_line_params
Returns:
-
DashObject
a new dash line object
- create_circle (parent_obj, params)
-
Create new circle dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_circle_params
Returns:
-
DashObject
a new dash circle object
- create_triangle (parent_obj, params)
-
Create new triangle dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_triangle_params
Returns:
-
DashObject
a new dash triangle object
- create_graph (parent_obj, params)
-
Create new graph dash object
Parameters:
- parent_obj DashObject the parent object of the new object
- params create_graph_params
Returns:
-
DashObject
a new dash graph object
- create_class_inherit_from_object (name)
-
Create new class derived from object
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_class_inherit_from_box (name)
-
Create new class derived from box
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_class_inherit_from_label (name)
-
Create new class derived from label
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_class_inherit_from_image (name)
-
Create new class derived from image
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_class_inherit_from_line (name)
-
Create new class derived from line
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_class_inherit_from_circle (name)
-
Create new class derived from circle
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_class_inherit_from_triangle (name)
-
Create new class derived from triangle
Parameters:
- name string name of new class
Returns:
-
the new class
See also:
- create_page (image)
-
Create new dash page
Parameters:
- image image handle, e.g. "dash.image.background_image"
Returns:
-
DashObject
a new dash page
- get_page (index)
-
Get dash page
Parameters:
- index int index of page
Returns:
-
DashObject
the dash page
- get_current_page ()
-
Get current page
Returns:
-
DashObject
the current dash page
- get_current_page_index ()
-
Get index of current page
Returns:
-
int
the current dash page index
- change_page (index)
-
Change the current page
Parameters:
- index int the index of the page to change to
Tables
- create_object_params
-
create_object parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default 100)
- height int height of object (default 100)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- create_box_params
-
create_box parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default 100)
- height int height of object (default 100)
- background_color int background color (default 0xffffff)
- border_color int border color (default 0xffffff)
- border_width int border width (default 0)
- border_radius int border radius (default 0)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- create_label_params
-
create_label parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default width of text)
- height int height of object (default height of text)
- text string the displayed text (default "")
- color int text color (default 0x000000)
- align string alignment of object One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- text_align string the alignment of the text. One of "auto", "left", "center", "right". (default "left")
- long_mode string mode of long text. One of "wrap", "dot", "scroll", "clip". (default "wrap")
- font text font handle, e.g. "dash.font.montserrat_24"
- create_image_params
-
create_image parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default 0)
- height int height of object (default 0)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- image image handle, e.g. "dash.image.background_image"
- create_line_params
-
create_line parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default 0)
- height int height of object (default 0)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- x1 int X coordinate of first point (default 0)
- y1 int Y coordinate of first point (default 0)
- x2 int X coordinate of second point (default 100)
- y2 int Y coordinate of second point (default 100)
- color int line color (default 0xffffff)
- line_width int width of line (default 5)
- rounded bool true if line ends are rounded (default true)
- create_circle_params
-
create_circle parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- radius int radius of circle (default 100)
- background_color int background color (default 0xffffff)
- background_visible bool true if background is visible (default false)
- border_color int border color (default 0xffffff)
- border_width int border width (default 1)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- create_triangle_params
-
create_triangle parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default 0)
- height int height of object (default 0)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- x1 int X coordinate of first point (default 0)
- y1 int Y coordinate of first point (default 0)
- x2 int X coordinate of second point (default 100)
- y2 int Y coordinate of second point (default 100)
- x3 int X coordinate of third point (default 0)
- y3 int Y coordinate of third point (default 100)
- background_color int background color (default 0xffffff)
- background_visible bool true if background is visible (default false)
- border_color int border color (default 0xffffff)
- border_width int border width (default 1)
- rounded bool true if triangle corners are rounded (default true)
- create_graph_params
-
create_graph parameters
Fields:
- x int X coordinate (default 0)
- y int Y coordinate (default 0)
- width int width of object (default 0)
- height int height of object (default 0)
- align string alignment of object. One of "default", "top\_left", "top\_mid", "top\_right", "bottom\_left", "bottom\_mid", "bottom\_right", "center\_left", "center\_right", "center". (default "default")
- value_count int number of values the graph shows (default 10)
- value_min int the minimum value shown on the graph (default 0)
- value_max int the maximum value shown on the graph (default 0)
- line_color int value line color (default 0xffffff)
- line_width int value line width (default 1)
- background_color int background color (default 0xffffff)
- background_visible bool true if background is visible (default false)
- border_color int border color (default 0xffffff)
- border_width int border width (default 1)
- border_radius int border radius (default 1)
- fill bool true if graph is filled (default false)
- fill_color int fill color (default 0xffffff)
- telemetry
-
Telemetry table.
Table containing all telemetry objects, e.g. dash.telemetry.engine_rpm
See also:
- font
- Font table. Table containing all fonts defined in json configuration file, e.g. dash.font.montserrat_24
- image
- Image table. Table containing all images defined in json configuration file, e.g. dash.image.background_image
- wheel
-
Wheel table.
See also:
- sim
-
Sim table.
See also:
- unit
-
Unit table.
See also:
- led
-
Led table.
See also: