@microtronics/studio-cli 0.59.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,8 +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(PAWN_SZTEMP_DECL);
224
- pawnSource('\tmemtostr(szTemp, mem, 0, dim);');
223
+ pawnSource('\t#pragma warning disable 224');
224
+ pawnSource('\tmemtostr(aData, mem, 0, dim);');
225
+ pawnSource('\t#pragma warning disable 224');
225
226
  pawnSource('\treturn dim;');
226
227
  pawnSource('}');
227
228
  }
@@ -256,7 +257,9 @@ function buildArrayGroupBlock(pawnSource, group) {
256
257
  pawnSource(`\tif (${condition}) {`);
257
258
  if (formatType === 'bin') {
258
259
  const fieldAccess = `${pawnVarBase}[${indexExpr}]${subField}`;
259
- 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});`);
260
263
  }
261
264
  else {
262
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.59.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",