Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 5, 2024
1 parent dbdb8cd commit 89b3b9a
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 39 deletions.
2 changes: 1 addition & 1 deletion packages/project-editor/flow/runtime/cpp/eez-framework
36 changes: 18 additions & 18 deletions packages/project-editor/flow/runtime/lvgl_runtime_v8.3.js
Original file line number Diff line number Diff line change
Expand Up @@ -969,24 +969,24 @@ function dbg(text) {
// === Body ===

var ASM_CONSTS = {
1038920: ($0) => { startToDebuggerMessage($0); },
1038952: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1039027: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1039102: ($0) => { finishToDebuggerMessage($0); },
1039135: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
1039189: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
1039243: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
1039296: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
1039349: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
1039402: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
1039435: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
1039471: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
1039577: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
1039613: ($0, $1) => { return eez_mqtt_connect($0, $1); },
1039650: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
1039690: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
1039747: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
1039806: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
1038936: ($0) => { startToDebuggerMessage($0); },
1038968: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1039043: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1039118: ($0) => { finishToDebuggerMessage($0); },
1039151: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
1039205: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
1039259: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
1039312: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
1039365: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
1039418: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
1039451: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
1039487: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
1039593: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
1039629: ($0, $1) => { return eez_mqtt_connect($0, $1); },
1039666: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
1039706: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
1039763: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
1039822: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
};


Expand Down
Binary file modified packages/project-editor/flow/runtime/lvgl_runtime_v8.3.wasm
Binary file not shown.
36 changes: 18 additions & 18 deletions packages/project-editor/flow/runtime/lvgl_runtime_v9.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -969,24 +969,24 @@ function dbg(text) {
// === Body ===

var ASM_CONSTS = {
1033784: ($0) => { startToDebuggerMessage($0); },
1033816: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1033891: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1033966: ($0) => { finishToDebuggerMessage($0); },
1033999: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
1034053: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
1034107: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
1034160: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
1034213: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
1034266: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
1034299: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
1034335: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
1034441: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
1034477: ($0, $1) => { return eez_mqtt_connect($0, $1); },
1034514: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
1034554: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
1034611: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
1034670: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
1033800: ($0) => { startToDebuggerMessage($0); },
1033832: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1033907: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
1033982: ($0) => { finishToDebuggerMessage($0); },
1034015: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
1034069: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
1034123: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
1034176: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
1034229: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
1034282: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
1034315: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
1034351: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
1034457: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
1034493: ($0, $1) => { return eez_mqtt_connect($0, $1); },
1034530: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
1034570: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
1034627: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
1034686: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
};


Expand Down
Binary file modified packages/project-editor/flow/runtime/lvgl_runtime_v9.0.wasm
Binary file not shown.
25 changes: 25 additions & 0 deletions packages/project-editor/lvgl/actions-catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,31 @@ registerAction({

////////////////////////////////////////////////////////////////////////////////

registerAction({
name: "objGetWidth",
properties: [
{
name: "object",
type: "widget"
},
{
name: "result",
type: "integer",
isAssignable: true
}
],
defaults: {},
label: ([object, width]) => (
<>
{object}
<RightArrow />
{width}
</>
)
});

////////////////////////////////////////////////////////////////////////////////

registerAction({
name: "objSetHeight",
properties: [
Expand Down
12 changes: 11 additions & 1 deletion resources/eez-framework-amalgamation/eez-flow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Autogenerated on October 5, 2024 10:39:36 AM from eez-framework commit 1f54d7345540e8962cd3b52f3a7d48b1fc5a5f3d */
/* Autogenerated on October 5, 2024 1:15:05 PM from eez-framework commit 0a0ef0e436676cb8b65d35398a878294623528c6 */
/*
* eez-framework
*
Expand Down Expand Up @@ -4307,6 +4307,15 @@ ACTION_START(objSetWidth)
lv_obj_set_width(obj, (lv_coord_t)width);
#endif
ACTION_END
ACTION_START(objGetWidth)
WIDGET_PROP(obj);
#if LVGL_VERSION_MAJOR >= 9
int32_t width = (int32_t)lv_obj_get_width(obj);
#else
int32_t width = lv_obj_get_width(obj);
#endif
RESULT(result, Value(width, VALUE_TYPE_INT32));
ACTION_END
ACTION_START(objSetHeight)
WIDGET_PROP(obj);
INT32_PROP(height);
Expand Down Expand Up @@ -4551,6 +4560,7 @@ static ActionType actions[] = {
&objSetX,
&objSetY,
&objSetWidth,
&objGetWidth,
&objSetHeight,
&objSetStyleOpa,
&objAddStyle,
Expand Down
2 changes: 1 addition & 1 deletion resources/eez-framework-amalgamation/eez-flow.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Autogenerated on October 5, 2024 10:39:36 AM from eez-framework commit 1f54d7345540e8962cd3b52f3a7d48b1fc5a5f3d */
/* Autogenerated on October 5, 2024 1:15:05 PM from eez-framework commit 0a0ef0e436676cb8b65d35398a878294623528c6 */
/*
* eez-framework
*
Expand Down

0 comments on commit 89b3b9a

Please sign in to comment.