|
1 |
| -/* Autogenerated on January 29, 2025 3:46:07 PM from eez-framework commit bc909755c9b83d15689e53474f6339176a299ac7 */ |
| 1 | +/* Autogenerated on January 30, 2025 2:10:05 PM from eez-framework commit ac84fe0e07a96635c7c1920fbbc2712f6fc42cd3 */ |
2 | 2 | /*
|
3 | 3 | * eez-framework
|
4 | 4 | *
|
@@ -7539,53 +7539,49 @@ extern "C" void flowPropagateValueUint32(void *flowState, unsigned componentInde
|
7539 | 7539 | }
|
7540 | 7540 | extern "C" void flowPropagateValueLVGLEvent(void *flowState, unsigned componentIndex, unsigned outputIndex, lv_event_t *event) {
|
7541 | 7541 | lv_event_code_t event_code = lv_event_get_code(event);
|
7542 |
| - if (eez::flow::hasAnyDataConnection((eez::flow::FlowState *)flowState, componentIndex, outputIndex)) { |
7543 |
| - uint32_t code = (uint32_t)event_code; |
7544 |
| - void *currentTarget = (void *)lv_event_get_current_target(event); |
7545 |
| - void *target = (void *)lv_event_get_target(event); |
7546 |
| - void *userDataPointer = lv_event_get_user_data(event); |
7547 |
| - int32_t userData = *((int32_t*)(&userDataPointer)); |
7548 |
| - uint32_t key = 0; |
7549 |
| - if (event_code == LV_EVENT_KEY || (event_code == LV_EVENT_VALUE_CHANGED && |
7550 |
| - #if LVGL_VERSION_MAJOR >= 9 |
7551 |
| - lv_obj_check_type((lv_obj_t*)target, &lv_buttonmatrix_class) |
7552 |
| - #else |
7553 |
| - lv_obj_check_type((lv_obj_t*)target, &lv_btnmatrix_class) |
7554 |
| - #endif |
7555 |
| - )) { |
7556 |
| - uint32_t *param = (uint32_t *)lv_event_get_param(event); |
7557 |
| - key = param ? *param : 0; |
7558 |
| - } |
7559 |
| - int32_t gestureDir = (int32_t)LV_DIR_NONE; |
7560 |
| - if (event_code == LV_EVENT_GESTURE) { |
7561 |
| - #if LVGL_VERSION_MAJOR >= 9 |
7562 |
| - lv_indev_wait_release(lv_indev_active()); |
7563 |
| - #else |
7564 |
| - lv_indev_wait_release(lv_indev_get_act()); |
7565 |
| - #endif |
7566 |
| - gestureDir = (int32_t)lv_indev_get_gesture_dir( |
7567 |
| - #if LVGL_VERSION_MAJOR >= 9 |
7568 |
| - lv_indev_active() |
7569 |
| - #else |
7570 |
| - lv_indev_get_act() |
7571 |
| - #endif |
7572 |
| - ); |
7573 |
| - } |
7574 |
| - int32_t rotaryDiff = 0; |
7575 |
| - #if LVGL_VERSION_MAJOR >= 9 |
7576 |
| - if (event_code == LV_EVENT_ROTARY) { |
7577 |
| - rotaryDiff = lv_event_get_rotary_diff(event); |
7578 |
| - } |
7579 |
| - #endif |
7580 |
| - eez::flow::propagateValue( |
7581 |
| - (eez::flow::FlowState *)flowState, componentIndex, outputIndex, |
7582 |
| - eez::Value::makeLVGLEventRef( |
7583 |
| - code, currentTarget, target, userData, key, gestureDir, rotaryDiff, 0xe7f23624 |
7584 |
| - ) |
| 7542 | + uint32_t code = (uint32_t)event_code; |
| 7543 | + void *currentTarget = (void *)lv_event_get_current_target(event); |
| 7544 | + void *target = (void *)lv_event_get_target(event); |
| 7545 | + void *userDataPointer = lv_event_get_user_data(event); |
| 7546 | + int32_t userData = *((int32_t*)(&userDataPointer)); |
| 7547 | + uint32_t key = 0; |
| 7548 | + if (event_code == LV_EVENT_KEY || (event_code == LV_EVENT_VALUE_CHANGED && |
| 7549 | +#if LVGL_VERSION_MAJOR >= 9 |
| 7550 | + lv_obj_check_type((lv_obj_t*)target, &lv_buttonmatrix_class) |
| 7551 | +#else |
| 7552 | + lv_obj_check_type((lv_obj_t*)target, &lv_btnmatrix_class) |
| 7553 | +#endif |
| 7554 | + )) { |
| 7555 | + uint32_t *param = (uint32_t *)lv_event_get_param(event); |
| 7556 | + key = param ? *param : 0; |
| 7557 | + } |
| 7558 | + int32_t gestureDir = (int32_t)LV_DIR_NONE; |
| 7559 | + if (event_code == LV_EVENT_GESTURE) { |
| 7560 | +#if LVGL_VERSION_MAJOR >= 9 |
| 7561 | + lv_indev_wait_release(lv_indev_active()); |
| 7562 | +#else |
| 7563 | + lv_indev_wait_release(lv_indev_get_act()); |
| 7564 | +#endif |
| 7565 | + gestureDir = (int32_t)lv_indev_get_gesture_dir( |
| 7566 | +#if LVGL_VERSION_MAJOR >= 9 |
| 7567 | + lv_indev_active() |
| 7568 | +#else |
| 7569 | + lv_indev_get_act() |
| 7570 | +#endif |
7585 | 7571 | );
|
7586 |
| - } else { |
7587 |
| - eez::flow::propagateValue((eez::flow::FlowState *)flowState, componentIndex, outputIndex); |
7588 | 7572 | }
|
| 7573 | + int32_t rotaryDiff = 0; |
| 7574 | +#if LVGL_VERSION_MAJOR >= 9 |
| 7575 | + if (event_code == LV_EVENT_ROTARY) { |
| 7576 | + rotaryDiff = lv_event_get_rotary_diff(event); |
| 7577 | + } |
| 7578 | +#endif |
| 7579 | + eez::flow::propagateValue( |
| 7580 | + (eez::flow::FlowState *)flowState, componentIndex, outputIndex, |
| 7581 | + eez::Value::makeLVGLEventRef( |
| 7582 | + code, currentTarget, target, userData, key, gestureDir, rotaryDiff, 0xe7f23624 |
| 7583 | + ) |
| 7584 | + ); |
7589 | 7585 | if (!lv_disp_get_default()->rendering_in_progress) {
|
7590 | 7586 | g_currentLVGLEvent = event;
|
7591 | 7587 | eez::flow::tick();
|
@@ -10089,6 +10085,9 @@ bool isComponentReadyToRun(FlowState *flowState, unsigned componentIndex) {
|
10089 | 10085 | if (component->type == defs_v3::COMPONENT_TYPE_LABEL_IN_ACTION) {
|
10090 | 10086 | return false;
|
10091 | 10087 | }
|
| 10088 | + if (component->type > defs_v3::FIRST_LVGL_WIDGET_COMPONENT_TYPE) { |
| 10089 | + return false; |
| 10090 | + } |
10092 | 10091 | if ((component->type < defs_v3::COMPONENT_TYPE_START_ACTION && component->type != defs_v3::COMPONENT_TYPE_USER_WIDGET_WIDGET) || component->type >= defs_v3::FIRST_DASHBOARD_WIDGET_COMPONENT_TYPE) {
|
10093 | 10092 | return true;
|
10094 | 10093 | }
|
|
0 commit comments