@microtronics/studio-cli 0.60.0 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -398,6 +398,13 @@ class AutoDDEGenerator {
398
398
  this.sourceType = 'defines';
399
399
  this.pawn(`#define ${arrayDimension} ${arrayInfo.length}`);
400
400
  if (arrayInfo.fields) {
401
+ // generate _dim defines for blob-type subfields within structured arrays
402
+ for (const subField of arrayInfo.fields) {
403
+ const subFieldTypeDef = fieldTypeDefinitions[subField.type];
404
+ if (subFieldTypeDef?.isBlob && subField.byteSize) {
405
+ this.addDefine(`${pre}_${arrayInfo.name}_${subField.name}_dim`, subField.byteSize);
406
+ }
407
+ }
401
408
  const fakeDDEContainer = {
402
409
  ...containerDefinition
403
410
  };
@@ -220,7 +220,9 @@ function buildHelperFunctions(pawnSource, usedFormats) {
220
220
  if (usedFormats.has('bin')) {
221
221
  pawnSource('');
222
222
  pawnSource('stock _DDE_fmt_bin(aData{}, mem{}, dim) {');
223
+ pawnSource('\t#pragma warning disable 224');
223
224
  pawnSource('\tmemtostr(aData, mem, 0, dim);');
225
+ pawnSource('\t#pragma warning disable 224');
224
226
  pawnSource('\treturn dim;');
225
227
  pawnSource('}');
226
228
  }
@@ -255,7 +257,9 @@ function buildArrayGroupBlock(pawnSource, group) {
255
257
  pawnSource(`\tif (${condition}) {`);
256
258
  if (formatType === 'bin') {
257
259
  const fieldAccess = `${pawnVarBase}[${indexExpr}]${subField}`;
258
- pawnSource(`\t\treturn _DDE_fmt_bin(aData, ${fieldAccess}, ${fieldAccess}_dim);`);
260
+ const subFieldName = subField ? subField.substring(1) : '';
261
+ const dimDefine = subFieldName ? `${pawnVarBase}_${subFieldName}_dim` : `${pawnVarBase}_dim`;
262
+ pawnSource(`\t\treturn _DDE_fmt_bin(aData, ${fieldAccess}, ${dimDefine});`);
259
263
  }
260
264
  else {
261
265
  pawnSource(`\t\treturn _DDE_fmt_${formatType}(aData, ${pawnVarBase}[${indexExpr}]${subField});`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microtronics/studio-cli",
3
- "version": "0.60.0",
3
+ "version": "0.61.0",
4
4
  "description": "Microtronics Studio CLI Tool",
5
5
  "main": "./out/api.js",
6
6
  "typings": "./dist/studio-cli.d.ts",
@@ -69,7 +69,7 @@
69
69
  "cross-env": "^7.0.3",
70
70
  "esbuild": "^0.27.3",
71
71
  "extract-zip": "^2.0.1",
72
- "uto-master": "bitbucket:microtronics-core/wasm-uto-master",
72
+ "uto-master": "bitbucket:microtronics-core/device-master#0.3.0",
73
73
  "mocha": "^10.8.2",
74
74
  "mocha-junit-reporter": "^2.2.1",
75
75
  "openapi-typescript": "^7.6.0",