|
1 |
| -/* Autogenerated on February 8, 2025 4:45:10 PM from eez-framework commit 7507056f49c45d6810265e8971792df50e8042de */ |
| 1 | +/* Autogenerated on February 14, 2025 2:23:02 PM from eez-framework commit 8c23d0d3ae10cc01543a62fe3bcc140b1aef6acb */ |
2 | 2 | /*
|
3 | 3 | * eez-framework
|
4 | 4 | *
|
@@ -3202,7 +3202,7 @@ void executeCallAction(FlowState *flowState, unsigned componentIndex, int flowIn
|
3202 | 3202 | g_executeActionFlowState = flowState;
|
3203 | 3203 | g_executeActionComponentIndex = componentIndex;
|
3204 | 3204 | executeActionFunction(flowIndex - flowState->flowDefinition->flows.count);
|
3205 |
| - if ((int)componentIndex != -1) { |
| 3205 | + if ((int)componentIndex != -1 && !flowState->componenentAsyncStates[componentIndex]) { |
3206 | 3206 | propagateValueThroughSeqout(flowState, componentIndex);
|
3207 | 3207 | }
|
3208 | 3208 | return;
|
@@ -7099,6 +7099,30 @@ void setUserProperty(unsigned propertyIndex, const Value &value) {
|
7099 | 7099 | }
|
7100 | 7100 | assignValue(g_executeActionFlowState, g_executeActionComponentIndex, dstValue, value);
|
7101 | 7101 | }
|
| 7102 | +AsyncAction *beginAsyncExecution() { |
| 7103 | + startAsyncExecution(g_executeActionFlowState, g_executeActionComponentIndex); |
| 7104 | + AsyncAction *asyncAction = (AsyncAction *) alloc(sizeof(AsyncAction), 0xcb44f51e); |
| 7105 | + asyncAction->flowState = g_executeActionFlowState; |
| 7106 | + asyncAction->componentIndex = g_executeActionComponentIndex; |
| 7107 | + return asyncAction; |
| 7108 | +} |
| 7109 | +void endAsyncExecution(AsyncAction *asyncAction) { |
| 7110 | + endAsyncExecution(asyncAction->flowState, asyncAction->componentIndex); |
| 7111 | + propagateValueThroughSeqout(asyncAction->flowState, asyncAction->componentIndex); |
| 7112 | + eez::free(asyncAction); |
| 7113 | +} |
| 7114 | +Value getUserPropertyAsync(AsyncAction *asyncAction, unsigned propertyIndex) { |
| 7115 | + Value value; |
| 7116 | + evalProperty(asyncAction->flowState, asyncAction->componentIndex, propertyIndex, value, FlowError::PropertyNum("CallAction", propertyIndex)); |
| 7117 | + return value; |
| 7118 | +} |
| 7119 | +void setUserPropertyAsync(AsyncAction *asyncAction, unsigned propertyIndex, const Value &value) { |
| 7120 | + Value dstValue; |
| 7121 | + if (!evalAssignableProperty(asyncAction->flowState, asyncAction->componentIndex, propertyIndex, dstValue, FlowError::PropertyInArray("CallAction", "Assignable property", propertyIndex))) { |
| 7122 | + return; |
| 7123 | + } |
| 7124 | + assignValue(g_executeActionFlowState, g_executeActionComponentIndex, dstValue, value); |
| 7125 | +} |
7102 | 7126 | #if EEZ_OPTION_GUI
|
7103 | 7127 | void executeFlowAction(const WidgetCursor &widgetCursor, int16_t actionId, void *param) {
|
7104 | 7128 | if (isFlowStopped()) {
|
@@ -7489,10 +7513,11 @@ static const void *getLvglImageByName(const char *name) {
|
7489 | 7513 | }
|
7490 | 7514 | return 0;
|
7491 | 7515 | }
|
7492 |
| -static lv_event_t *g_currentLVGLEvent; |
| 7516 | +uint8_t g_lastLVGLEventUserDataBuffer[64]; |
| 7517 | +uint8_t g_lastLVGLEventParamBuffer[64]; |
| 7518 | +static lv_event_t g_lastLVGLEvent; |
7493 | 7519 | static void executeLvglAction(int actionIndex) {
|
7494 |
| - g_actions[actionIndex](g_currentLVGLEvent); |
7495 |
| - g_currentLVGLEvent = 0; |
| 7520 | + g_actions[actionIndex](&g_lastLVGLEvent); |
7496 | 7521 | }
|
7497 | 7522 | void eez_flow_init_themes(const char **themeNames, size_t numThemes, void (*changeColorTheme)(uint32_t themeIndex)) {
|
7498 | 7523 | g_themeNames = themeNames;
|
@@ -7709,7 +7734,15 @@ extern "C" void flowPropagateValueLVGLEvent(void *flowState, unsigned componentI
|
7709 | 7734 | code, currentTarget, target, userData, key, gestureDir, rotaryDiff, 0xe7f23624
|
7710 | 7735 | )
|
7711 | 7736 | );
|
7712 |
| - g_currentLVGLEvent = event; |
| 7737 | + g_lastLVGLEvent = *event; |
| 7738 | + if (event->user_data) { |
| 7739 | + g_lastLVGLEvent.user_data = &g_lastLVGLEventUserDataBuffer; |
| 7740 | + memcpy(&g_lastLVGLEventUserDataBuffer, event->user_data, sizeof(g_lastLVGLEventUserDataBuffer)); |
| 7741 | + } |
| 7742 | + if (event->param) { |
| 7743 | + g_lastLVGLEvent.param = &g_lastLVGLEventParamBuffer; |
| 7744 | + memcpy(&g_lastLVGLEventParamBuffer, event->param, sizeof(g_lastLVGLEventParamBuffer)); |
| 7745 | + } |
7713 | 7746 | }
|
7714 | 7747 | #ifndef EEZ_LVGL_TEMP_STRING_BUFFER_SIZE
|
7715 | 7748 | #define EEZ_LVGL_TEMP_STRING_BUFFER_SIZE 1024
|
|
0 commit comments