mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Rename object_set_group_values and object_set_normalized_group_values
This commit is contained in:
parent
0761b3f207
commit
73f0b8e131
@ -222,7 +222,7 @@ void object_dispatch_state(uint8_t pageid, uint8_t btnid, const char* payload)
|
|||||||
|
|
||||||
// ##################### State Changers ########################################################
|
// ##################### State Changers ########################################################
|
||||||
|
|
||||||
void object_set_group_value(lv_obj_t* parent, uint8_t groupid, int16_t intval)
|
void object_set_group_values(lv_obj_t* parent, uint8_t groupid, int16_t intval)
|
||||||
{
|
{
|
||||||
if(groupid == 0 || parent == nullptr) return;
|
if(groupid == 0 || parent == nullptr) return;
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ void object_set_group_value(lv_obj_t* parent, uint8_t groupid, int16_t intval)
|
|||||||
if(groupid == child->user_data.groupid) hasp_process_obj_attribute_val(child, NULL, intval, intval, true);
|
if(groupid == child->user_data.groupid) hasp_process_obj_attribute_val(child, NULL, intval, intval, true);
|
||||||
|
|
||||||
/* update grandchildren */
|
/* update grandchildren */
|
||||||
object_set_group_value(child, groupid, intval);
|
object_set_group_values(child, groupid, intval);
|
||||||
|
|
||||||
/* check tabs */
|
/* check tabs */
|
||||||
if(check_obj_type(child, LV_HASP_TABVIEW)) {
|
if(check_obj_type(child, LV_HASP_TABVIEW)) {
|
||||||
@ -246,7 +246,7 @@ void object_set_group_value(lv_obj_t* parent, uint8_t groupid, int16_t intval)
|
|||||||
hasp_process_obj_attribute_val(tab, NULL, intval, intval, true); /* tab found, update it */
|
hasp_process_obj_attribute_val(tab, NULL, intval, intval, true); /* tab found, update it */
|
||||||
|
|
||||||
/* check grandchildren */
|
/* check grandchildren */
|
||||||
object_set_group_value(tab, groupid, intval);
|
object_set_group_values(tab, groupid, intval);
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
@ -256,14 +256,14 @@ void object_set_group_value(lv_obj_t* parent, uint8_t groupid, int16_t intval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO make this a recursive function that goes over all objects only ONCE
|
// Recursive function that goes over all objects only ONCE
|
||||||
void object_set_normalized_group_value(uint8_t groupid, lv_obj_t* src_obj, int16_t val, int16_t min, int16_t max)
|
void object_set_normalized_group_values(uint8_t groupid, lv_obj_t* src_obj, int16_t val, int16_t min, int16_t max)
|
||||||
{
|
{
|
||||||
if(groupid == 0) return;
|
if(groupid == 0) return;
|
||||||
if(min == max) return;
|
if(min == max) return;
|
||||||
|
|
||||||
for(uint8_t page = 0; page < HASP_NUM_PAGES; page++) {
|
for(uint8_t page = 0; page < HASP_NUM_PAGES; page++) {
|
||||||
object_set_group_value(haspPages.get_obj(page), groupid, val);
|
object_set_group_values(haspPages.get_obj(page), groupid, val);
|
||||||
// uint8_t startid = 1;
|
// uint8_t startid = 1;
|
||||||
// for(uint8_t objid = startid; objid < 20; objid++) {
|
// for(uint8_t objid = startid; objid < 20; objid++) {
|
||||||
// lv_obj_t* obj = hasp_find_obj_from_parent_id(get_page_obj(page), objid);
|
// lv_obj_t* obj = hasp_find_obj_from_parent_id(get_page_obj(page), objid);
|
||||||
|
@ -75,7 +75,7 @@ void object_dispatch_state(uint8_t pageid, uint8_t btnid, const char* payload);
|
|||||||
|
|
||||||
void hasp_process_attribute(uint8_t pageid, uint8_t objid, const char* attr, const char* payload);
|
void hasp_process_attribute(uint8_t pageid, uint8_t objid, const char* attr, const char* payload);
|
||||||
|
|
||||||
void object_set_normalized_group_value(uint8_t groupid, lv_obj_t* src_obj, int16_t val, int16_t min, int16_t max);
|
void object_set_normalized_group_values(uint8_t groupid, lv_obj_t* src_obj, int16_t val, int16_t min, int16_t max);
|
||||||
|
|
||||||
#define HASP_OBJ_BAR 1971
|
#define HASP_OBJ_BAR 1971
|
||||||
#define HASP_OBJ_BTN 3164
|
#define HASP_OBJ_BTN 3164
|
||||||
|
Loading…
x
Reference in New Issue
Block a user