I want to find...

Search

Shares

Table of Content

86HMI::Gauge

[Visualization widgets]

Object Functions

Gauge object.

Gauge-1

Gauge Properties.

Gauge-2

Identifier:

  • ID: Unique number that identifies the object.
  • Name: User-definable name for the object. It can be used with 86HMI API.

Content:

  • MaxValue: Maximum value can be positive or negative but must not be less than the minimum value.
  • MinValue: Minimum value can be positive or negative but must not be bigger than the maximum value.

Needle Settings:

  • Number of Needles: Needles number, up to 4.
  • Needle Thickness: Needles thickness.
  • Center Point Size: Center point size or no display.
  • Needle 1~4 Value: Initial value of each needle.
  • Needle 1~4 Color: Each needles color.

Geometry:

  • X: Object X coordinate.
  • Y: Object Y coordinate.
  • Width: Object width.
  • Height: Object height.

Options:

  • AngleStart: Starting angle of Gauge.
  • AngleEnd: Ending angle of Gauge.
    Gauge-3
  • Counter of Scale Labels: Set the counter of scale labels, with the default being 6. Users can select from 2 to 11 by drop-down.
  • Interval Ticks: Set the interval ticks divisions from 0 to 9.
  • Critical Value: Alarm start value.
  • Background: Gauge background (circle) displayed or not.
  • ObjColor: Choose from 4 themed colors. For font configuration instructions, please refer to Theme Management.
  • Order: Object order. It can adjust the object order by up/down, which can be viewed on the Object List.

API Functions

setGaugeValue()

Description

Set Gauge needle value.

Syntax

void setGaugeValue(lv_obj_t* id, int value);
void setGaugeValue(char* name, int value);
void setGaugeValue(lv_obj_t* id, int value, int needle);
void setGaugeValue(char* name, int value, int needle);

Parameters

  • [in] id
    Object ID.
  • [in] name
    Object Name.
  • [in] value
    Set Gauge needle value.
  • [in] needle
    Set Gauge needle.

Return

None.

Example

#include "myhmi.h"

void setup() {    
  Hmi.begin();
  // ...
  Hmi.setGaugeValue(p1ga1, 100, 1);
}

void loop() {
  // ...
}

Please see the 86HMI Editor User Manual for more instructions on 86HMI widgets and API usage.

Scroll to Top