Skip to content

Commit 47dc02e

Browse files
committed
1 parent d4aae76 commit 47dc02e

File tree

8 files changed

+51
-10
lines changed

8 files changed

+51
-10
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Envox <eez@envox.hr>",
44
"description": "Cross-platform visual development tool and SCPI instrument controller",
55
"homepage": "https://www.envox.hr/eez/studio/studio-introduction.html",
6-
"version": "0.22.0",
6+
"version": "0.23.0",
77
"revision": "1",
88
"license": "GPL-3.0-only",
99
"repository": "https://github.com/eez-open/studio",

packages/home/tabs-store.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export class ProjectEditorTab implements IHomeTab {
676676
!event.shiftKey &&
677677
!event.altKey
678678
) {
679-
if (event.key == "Backspace" || event.key == "Delete") {
679+
if (event.key == "Delete") {
680680
deleteSelection();
681681
}
682682
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

resources/eez-framework-amalgamation/eez-flow.cpp

+39-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 */
22
/*
33
* eez-framework
44
*
@@ -3202,7 +3202,7 @@ void executeCallAction(FlowState *flowState, unsigned componentIndex, int flowIn
32023202
g_executeActionFlowState = flowState;
32033203
g_executeActionComponentIndex = componentIndex;
32043204
executeActionFunction(flowIndex - flowState->flowDefinition->flows.count);
3205-
if ((int)componentIndex != -1) {
3205+
if ((int)componentIndex != -1 && !flowState->componenentAsyncStates[componentIndex]) {
32063206
propagateValueThroughSeqout(flowState, componentIndex);
32073207
}
32083208
return;
@@ -7099,6 +7099,30 @@ void setUserProperty(unsigned propertyIndex, const Value &value) {
70997099
}
71007100
assignValue(g_executeActionFlowState, g_executeActionComponentIndex, dstValue, value);
71017101
}
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+
}
71027126
#if EEZ_OPTION_GUI
71037127
void executeFlowAction(const WidgetCursor &widgetCursor, int16_t actionId, void *param) {
71047128
if (isFlowStopped()) {
@@ -7489,10 +7513,11 @@ static const void *getLvglImageByName(const char *name) {
74897513
}
74907514
return 0;
74917515
}
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;
74937519
static void executeLvglAction(int actionIndex) {
7494-
g_actions[actionIndex](g_currentLVGLEvent);
7495-
g_currentLVGLEvent = 0;
7520+
g_actions[actionIndex](&g_lastLVGLEvent);
74967521
}
74977522
void eez_flow_init_themes(const char **themeNames, size_t numThemes, void (*changeColorTheme)(uint32_t themeIndex)) {
74987523
g_themeNames = themeNames;
@@ -7709,7 +7734,15 @@ extern "C" void flowPropagateValueLVGLEvent(void *flowState, unsigned componentI
77097734
code, currentTarget, target, userData, key, gestureDir, rotaryDiff, 0xe7f23624
77107735
)
77117736
);
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+
}
77137746
}
77147747
#ifndef EEZ_LVGL_TEMP_STRING_BUFFER_SIZE
77157748
#define EEZ_LVGL_TEMP_STRING_BUFFER_SIZE 1024

resources/eez-framework-amalgamation/eez-flow.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 */
22
/*
33
* eez-framework
44
*
@@ -2632,6 +2632,14 @@ void setGlobalVariable(uint32_t globalVariableIndex, const Value &value);
26322632
void setGlobalVariable(Assets *assets, uint32_t globalVariableIndex, const Value &value);
26332633
Value getUserProperty(unsigned propertyIndex);
26342634
void setUserProperty(unsigned propertyIndex, const Value &value);
2635+
struct AsyncAction {
2636+
eez::flow::FlowState *flowState;
2637+
unsigned componentIndex;
2638+
};
2639+
AsyncAction *beginAsyncExecution();
2640+
void endAsyncExecution(AsyncAction *asyncAction);
2641+
Value getUserPropertyAsync(AsyncAction *asyncAction, unsigned propertyIndex);
2642+
void setUserPropertyAsync(AsyncAction *asyncAction, unsigned propertyIndex, const Value &value);
26352643
#if EEZ_OPTION_GUI
26362644
FlowState *getUserWidgetFlowState(FlowState *flowState, uint16_t userWidgetWidgetComponentIndex, int16_t pageId);
26372645
void executeFlowAction(const WidgetCursor &widgetCursor, int16_t actionId, void *param);

0 commit comments

Comments
 (0)