[Control widgets]
Object Functions
Arc Slider object.
It can control the movement of the ArcLinearSlider to manage the change of events and can be used to adjust the numerical to change objects.

ArcSlider Properties.

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 ArcSlider.
- AngleEnd: Ending angle of ArcSlider.
- 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:
- Rectangle
- Circle
- Hidden
- BgColor: Background color can be chosen through the color palette or by directly inputting the color code.
- Bar Thickness: Adjustable thickness of ArcSlider.
- ObjColor: Choose from 4 themed colors. For font configuration instructions, please refer to Theme Management.
- Enable: Select the default state of the object, enable or disable.
- Order: Object order. It can adjust the object order by up/down, which can be viewed on the Object List.
API Functions
setArcSliderValue()
Description
Set ArcSlider value.
Syntax
void setArcSliderValue(lv_obj_t* id, int value);
void setArcSliderValue(char* name, int value);
Parameters
[in] id
Object ID.[in] name
Object Name.[in] value
Set ArcSlider value.
Return
None.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... Hmi.setArcSliderValue(p1asl1, 100); } void loop() { // ... }
getArcSliderValue()
Description
Get ArcSlider value.
Syntax
int getArcSliderValue(lv_obj_t* id);
int getArcSliderValue(char* name);
Parameters
[in] id
Object ID.[in] name
Object Name.
Return
ArcSlider value.
Example
#include "myhmi.h" void setup() { Serial.begin(115200); while (!Serial); Hmi.begin(); // ... Hmi.setArcSliderValue(p1asl1, 100); Serial.print("p1as1 value: "); Serial.println(Hmi.getArcSliderValue(p1asl1)); } void loop() { // ... }
arcSliderDragging()
The following Event Functions are written between BEGIN_HMI_EVENT_PROC
and END_HMI_EVENT_PROC
.
Description
Determine ArcSlider is dragging.
Syntax
bool arcSliderDragging(lv_obj_t* id);
bool arcSliderDragging(char* name);
Parameters
[in] id
Object ID.[in] name
Object Name.
Return
Bool. Determine ArcSlider is dragging.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... } void loop() { BEGIN_HMI_EVENT_PROC { if (Hmi.arcSliderDragging(p1asl1)) { // do something. } } END_HMI_EVENT_PROC }
arcSliderDropped()
The following Event Functions are written between BEGIN_HMI_EVENT_PROC
and END_HMI_EVENT_PROC
.
Description
Determine ArcSlider is dropped.
Syntax
bool arcSliderDropped(lv_obj_t* id);
bool arcSliderDropped(char* name);
Parameters
[in] id
Object ID.[in] name
Object Name.
Return
Bool. Determine ArcSlider is dropped.
Example
#include "myhmi.h" void setup() { Hmi.begin(); // ... } void loop() { BEGIN_HMI_EVENT_PROC { if (Hmi.arcSliderDropped(p1asl1)) { // do something. } } END_HMI_EVENT_PROC }
Please see the 86HMI Editor User Manual for more instructions on 86HMI widgets and API usage.