Skip to content

Commit ed202f6

Browse files
committed
1 parent 17cd024 commit ed202f6

File tree

21 files changed

+326
-77
lines changed

21 files changed

+326
-77
lines changed

package.json

Lines changed: 1 addition & 1 deletion
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.23.0",
6+
"version": "0.23.1",
77
"revision": "1",
88
"license": "GPL-3.0-only",
99
"repository": "https://github.com/eez-open/studio",

packages/project-editor/flow/components/widgets/eez-gui/index.tsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ import {
123123
import {
124124
GAUGE_ICON,
125125
LINE_CHART_ICON,
126+
QR_CODE_ICON,
126127
SWITCH_WIDGET_ICON
127128
} from "project-editor/ui-components/icons";
128129
import { getComponentName } from "project-editor/flow/components/components-registry";
@@ -5825,23 +5826,7 @@ export class QRCodeWidget extends Widget {
58255826
errorCorrection: "medium"
58265827
},
58275828

5828-
icon: (
5829-
<svg viewBox="0 0 16 16">
5830-
<path fill="currentColor" d="M6 0H0v6h6V0zM5 5H1V1h4v4z" />
5831-
<path
5832-
fill="currentColor"
5833-
d="M2 2h2v2H2V2zM0 16h6v-6H0v6zm1-5h4v4H1v-4z"
5834-
/>
5835-
<path
5836-
fill="currentColor"
5837-
d="M2 12h2v2H2v-2zm8-12v6h6V0h-6zm5 5h-4V1h4v4z"
5838-
/>
5839-
<path
5840-
fill="currentColor"
5841-
d="M12 2h2v2h-2V2zM2 7H0v2h3V8H2zm5 2h2v2H7V9zM3 7h2v1H3V7zm6 5H7v1h1v1h1v-1zM6 7v1H5v1h2V7zm2-3h1v2H8V4zm1 4v1h2V7H8v1zM7 6h1v1H7V6zm2 8h2v2H9v-2zm-2 0h1v2H7v-2zm2-3h1v1H9v-1zm0-8V1H8V0H7v4h1V3zm3 11h1v2h-1v-2zm0-2h2v1h-2v-1zm-1 1h1v1h-1v-1zm-1-1h1v1h-1v-1zm4-2v1h1v1h1v-2h-1zm1 3h-1v3h2v-2h-1zm-5-3v1h3V9h-2v1zm2-3v1h2v1h2V7h-2z"
5842-
/>
5843-
</svg>
5844-
)
5829+
icon: QR_CODE_ICON
58455830
});
58465831

58475832
getText(flowContext: IFlowContext) {

packages/project-editor/flow/runtime/lvgl_runtime_v8.3.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -969,29 +969,29 @@ function dbg(text) {
969969
// === Body ===
970970

971971
var ASM_CONSTS = {
972-
1045600: ($0) => { startToDebuggerMessage($0); },
973-
1045632: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
974-
1045707: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
975-
1045782: ($0) => { finishToDebuggerMessage($0); },
976-
1045815: ($0, $1) => { lvglCreateScreen($0, $1); },
977-
1045845: ($0, $1) => { lvglDeleteScreen($0, $1); },
978-
1045875: ($0) => { lvglScreenTick($0); },
979-
1045899: ($0, $1, $2, $3) => { lvglOnEventHandler($0, $1, $2, $3); },
980-
1045939: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
981-
1045993: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
982-
1046047: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
983-
1046100: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
984-
1046153: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
985-
1046206: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
986-
1046239: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
987-
1046275: ($0, $1) => { lvglSetColorTheme($0, UTF8ToString($1)); },
988-
1046320: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
989-
1046426: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
990-
1046462: ($0, $1) => { return eez_mqtt_connect($0, $1); },
991-
1046499: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
992-
1046539: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
993-
1046596: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
994-
1046655: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
972+
1045584: ($0) => { startToDebuggerMessage($0); },
973+
1045616: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
974+
1045691: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
975+
1045766: ($0) => { finishToDebuggerMessage($0); },
976+
1045799: ($0, $1) => { lvglCreateScreen($0, $1); },
977+
1045829: ($0, $1) => { lvglDeleteScreen($0, $1); },
978+
1045859: ($0) => { lvglScreenTick($0); },
979+
1045883: ($0, $1, $2, $3) => { lvglOnEventHandler($0, $1, $2, $3); },
980+
1045923: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
981+
1045977: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
982+
1046031: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
983+
1046084: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
984+
1046137: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
985+
1046190: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
986+
1046223: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
987+
1046259: ($0, $1) => { lvglSetColorTheme($0, UTF8ToString($1)); },
988+
1046304: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
989+
1046410: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
990+
1046446: ($0, $1) => { return eez_mqtt_connect($0, $1); },
991+
1046483: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
992+
1046523: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
993+
1046580: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
994+
1046639: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
995995
};
996996

997997

Binary file not shown.

packages/project-editor/flow/runtime/lvgl_runtime_v9.0.js

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -969,29 +969,29 @@ function dbg(text) {
969969
// === Body ===
970970

971971
var ASM_CONSTS = {
972-
1039904: ($0) => { startToDebuggerMessage($0); },
973-
1039936: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
974-
1040011: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
975-
1040086: ($0) => { finishToDebuggerMessage($0); },
976-
1040119: ($0, $1) => { lvglCreateScreen($0, $1); },
977-
1040149: ($0, $1) => { lvglDeleteScreen($0, $1); },
978-
1040179: ($0) => { lvglScreenTick($0); },
979-
1040203: ($0, $1, $2, $3) => { lvglOnEventHandler($0, $1, $2, $3); },
980-
1040243: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
981-
1040297: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
982-
1040351: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
983-
1040404: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
984-
1040457: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
985-
1040510: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
986-
1040543: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
987-
1040579: ($0, $1) => { lvglSetColorTheme($0, UTF8ToString($1)); },
988-
1040624: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
989-
1040730: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
990-
1040766: ($0, $1) => { return eez_mqtt_connect($0, $1); },
991-
1040803: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
992-
1040843: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
993-
1040900: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
994-
1040959: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
972+
1041936: ($0) => { startToDebuggerMessage($0); },
973+
1041968: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
974+
1042043: ($0, $1, $2) => { writeDebuggerBuffer($0, new Uint8Array(Module.HEAPU8.buffer, $1, $2)); },
975+
1042118: ($0) => { finishToDebuggerMessage($0); },
976+
1042151: ($0, $1) => { lvglCreateScreen($0, $1); },
977+
1042181: ($0, $1) => { lvglDeleteScreen($0, $1); },
978+
1042211: ($0) => { lvglScreenTick($0); },
979+
1042235: ($0, $1, $2, $3) => { lvglOnEventHandler($0, $1, $2, $3); },
980+
1042275: ($0, $1) => { return getLvglScreenByName($0, UTF8ToString($1)); },
981+
1042329: ($0, $1) => { return getLvglObjectByName($0, UTF8ToString($1)); },
982+
1042383: ($0, $1) => { return getLvglGroupByName($0, UTF8ToString($1)); },
983+
1042436: ($0, $1) => { return getLvglStyleByName($0, UTF8ToString($1)); },
984+
1042489: ($0, $1) => { return getLvglImageByName($0, UTF8ToString($1)); },
985+
1042542: ($0, $1, $2) => { lvglObjAddStyle($0, $1, $2); },
986+
1042575: ($0, $1, $2) => { lvglObjRemoveStyle($0, $1, $2); },
987+
1042611: ($0, $1) => { lvglSetColorTheme($0, UTF8ToString($1)); },
988+
1042656: ($0, $1, $2, $3, $4, $5) => { return eez_mqtt_init($0, UTF8ToString($1), UTF8ToString($2), $3, UTF8ToString($4), UTF8ToString($5)); },
989+
1042762: ($0, $1) => { return eez_mqtt_deinit($0, $1); },
990+
1042798: ($0, $1) => { return eez_mqtt_connect($0, $1); },
991+
1042835: ($0, $1) => { return eez_mqtt_disconnect($0, $1); },
992+
1042875: ($0, $1, $2) => { return eez_mqtt_subscribe($0, $1, UTF8ToString($2)); },
993+
1042932: ($0, $1, $2) => { return eez_mqtt_unsubscribe($0, $1, UTF8ToString($2)); },
994+
1042991: ($0, $1, $2, $3) => { return eez_mqtt_publish($0, $1, UTF8ToString($2), UTF8ToString($3)); }
995995
};
996996

997997

@@ -5555,6 +5555,11 @@ var _lv_bin_decoder_open = Module['_lv_bin_decoder_open'] = createExportWrapper(
55555555
var _lv_bin_decoder_get_area = Module['_lv_bin_decoder_get_area'] = createExportWrapper('lv_bin_decoder_get_area');
55565556
var _lv_bin_decoder_close = Module['_lv_bin_decoder_close'] = createExportWrapper('lv_bin_decoder_close');
55575557
var _lv_fs_stdio_init = Module['_lv_fs_stdio_init'] = createExportWrapper('lv_fs_stdio_init');
5558+
var _lv_qrcode_set_size = Module['_lv_qrcode_set_size'] = createExportWrapper('lv_qrcode_set_size');
5559+
var _lv_qrcode_create = Module['_lv_qrcode_create'] = createExportWrapper('lv_qrcode_create');
5560+
var _lv_qrcode_set_dark_color = Module['_lv_qrcode_set_dark_color'] = createExportWrapper('lv_qrcode_set_dark_color');
5561+
var _lv_qrcode_set_light_color = Module['_lv_qrcode_set_light_color'] = createExportWrapper('lv_qrcode_set_light_color');
5562+
var _lv_qrcode_update = Module['_lv_qrcode_update'] = createExportWrapper('lv_qrcode_update');
55585563
var _lv_is_initialized = Module['_lv_is_initialized'] = createExportWrapper('lv_is_initialized');
55595564
var _lv_rand_set_seed = Module['_lv_rand_set_seed'] = createExportWrapper('lv_rand_set_seed');
55605565
var _lv_mem_init = Module['_lv_mem_init'] = createExportWrapper('lv_mem_init');
Binary file not shown.

packages/project-editor/lvgl/actions-catalog.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,34 @@ registerAction({
12101210

12111211
////////////////////////////////////////////////////////////////////////////////
12121212

1213+
registerAction({
1214+
id: 58,
1215+
name: "qrCodeUpdate",
1216+
displayName: "QR code update",
1217+
group: "QRCode",
1218+
properties: [
1219+
{
1220+
name: "object",
1221+
type: "widget:QRCode",
1222+
helpText: "QR code widget"
1223+
},
1224+
{
1225+
name: "text",
1226+
type: "string",
1227+
helpText: "The text to display"
1228+
}
1229+
],
1230+
defaults: {},
1231+
label: ([object, text]) => (
1232+
<>
1233+
{object} {text}
1234+
</>
1235+
),
1236+
helpText: "Set the text of a QR code object"
1237+
});
1238+
1239+
////////////////////////////////////////////////////////////////////////////////
1240+
12131241
registerAction({
12141242
id: 30,
12151243
name: "rollerSetSelected",

packages/project-editor/lvgl/actions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ function getValueTypeFromActionPropertyType(
116116
export interface IActionDefinition {
117117
id: number;
118118
name: string;
119+
displayName?: string;
119120
group: string;
120121
properties: IActionPropertyDefinition[];
121122
defaults: any;
@@ -133,7 +134,7 @@ const actionNameToActionId = new Map<string, number>();
133134
const actionIdToActionName = new Map<number, string>();
134135

135136
function getActionDisplayName(actionDefinition: IActionDefinition) {
136-
return humanize(actionDefinition.name)
137+
return (actionDefinition.displayName || humanize(actionDefinition.name))
137138
.split(" ")
138139
.map(word =>
139140
word == "to" ? word : word[0].toUpperCase() + word.substring(1)

packages/project-editor/lvgl/build.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,10 @@ export class LVGLBuild extends Build {
809809
? "eez_flow_get_selected_theme_index()"
810810
: "active_theme_index"
811811
);
812-
callback(colorAccessor, getParams());
812+
813+
const params = getParams();
814+
815+
callback(colorAccessor, params);
813816

814817
if (!this.isFirstPass && fromTheme) {
815818
this.updateColorCallbacks.push({
@@ -819,7 +822,7 @@ export class LVGLBuild extends Build {
819822
color,
820823
"theme_index"
821824
);
822-
updateCallback(colorAccessor, getParams());
825+
updateCallback(colorAccessor, params);
823826
}
824827
});
825828
}
@@ -849,7 +852,9 @@ export class LVGLBuild extends Build {
849852
: "active_theme_index"
850853
);
851854

852-
callback(color1Accessor, color2Accessor, getParams());
855+
const params = getParams();
856+
857+
callback(color1Accessor, color2Accessor, params);
853858

854859
if (!this.isFirstPass && (color1FromTheme || color2FromTheme)) {
855860
this.updateColorCallbacks.push({
@@ -859,7 +864,7 @@ export class LVGLBuild extends Build {
859864
this.getColorAccessor(color1, "theme_index");
860865
const { colorAccessor: color2Accessor } =
861866
this.getColorAccessor(color2, "theme_index");
862-
updateCallback(color1Accessor, color2Accessor, getParams());
867+
updateCallback(color1Accessor, color2Accessor, params);
863868
}
864869
});
865870
}

packages/project-editor/lvgl/widgets/Led.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ export class LVGLLedWidget extends LVGLWidget {
153153
)});`
154154
);
155155
} else {
156-
code.callObjectFunction(
156+
code.callFreeFunction(
157157
"lv_led_set_color",
158+
obj,
158159
code.color(color)
159160
);
160161
}

0 commit comments

Comments
 (0)