I want to find...

Search

Shares

Table of Content

86HMI::ArcBar

[Visualization widgets]

Object Functions

ArcBar object.

ArcBar-1

ArcBar Properties.

ArcBar-2

Identifier:

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

Content:

  • ShowValue: Displayed value or not.
  • Value: Initial value of the object.
  • 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.
  • SuffixText: Suffix text after the value.

Geometry:

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

Options:

  • AngleStart: Starting angle of ArcBar.
  • AngleEnd: Ending angle of ArcBar.
    ArcBar-3
  • TextColor: Text color can be chosen through the color palette or by directly inputting the color code.
  • TextFont: Choose from 6 default font styles. For font configuration instructions, please refer to Theme Management.
  • Background: Object background type, there are three types:
    1. Rectangle
    2. Circle
    3. Hidden
  • BgColor: Background color can be chosen through the color palette or by directly inputting the color code.
  • Bar Thickness: Adjustable thickness of ArcBar.
    ArcBar-4
  • 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

setArcBarValue()

Description

Set ArcBar value.

Syntax

void setArcBarValue(lv_obj_t* id, double value);
void setArcBarValue(char* name, double value);

Parameters

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

Return

None.

Example

#include "myhmi.h"

void setup() {  
  Hmi.begin();
  // ...
  Hmi.setArcBarValue(p1abar1, 100);
}

void loop() {
  // ...
}

getArcBarValue()

Description

Get ArcBar value.

Syntax

double getArcBarValue(lv_obj_t* id);
double getArcBarValue(char* name);

Parameters

  • [in] id
    Object ID.
  • [in] name
    Object Name.

Return

ArcBar value.

Example

#include "myhmi.h"

void setup() {  
  Serial.begin(115200);
  while (!Serial);
  
  Hmi.begin();
  // ...
  Hmi.setArcBarValue(p1abar1, 100);
  Serial.print("p1abar1 value: ");
  Serial.println(Hmi.getArcBarValue(p1abar1));
}

void loop() {
  // ...
}

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

Scroll to Top