pxt-common-packages 12.3.30 → 12.3.31

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.
Files changed (44) hide show
  1. package/built/common-sim.js +2 -1
  2. package/libs/accelerometer/built/debug/binary.js +8 -8
  3. package/libs/azureiot/built/debug/binary.js +461 -461
  4. package/libs/base/math.ts +28 -5
  5. package/libs/color/built/debug/binary.js +8 -8
  6. package/libs/color-sensor/built/debug/binary.js +8 -8
  7. package/libs/controller/built/debug/binary.js +7388 -7377
  8. package/libs/controller---none/built/debug/binary.js +7368 -7357
  9. package/libs/core/built/debug/binary.js +2 -2
  10. package/libs/core---samd/built/debug/binary.js +8 -8
  11. package/libs/datalogger/built/debug/binary.js +63 -63
  12. package/libs/edge-connector/built/debug/binary.js +8 -8
  13. package/libs/esp32/built/debug/binary.js +462 -462
  14. package/libs/game/built/debug/binary.js +7307 -7296
  15. package/libs/game/sprite.ts +4 -0
  16. package/libs/gamepad/built/debug/binary.js +8 -8
  17. package/libs/keyboard/built/debug/binary.js +8 -8
  18. package/libs/lcd/built/debug/binary.js +8 -8
  19. package/libs/light/built/debug/binary.js +8 -8
  20. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  21. package/libs/lora/built/debug/binary.js +8 -8
  22. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  23. package/libs/microphone/built/debug/binary.js +8 -8
  24. package/libs/mouse/built/debug/binary.js +8 -8
  25. package/libs/mqtt/built/debug/binary.js +176 -176
  26. package/libs/music/built/debug/binary.js +8 -8
  27. package/libs/net/built/debug/binary.js +176 -176
  28. package/libs/net-game/built/debug/binary.js +9024 -9013
  29. package/libs/palette/built/debug/binary.js +7306 -7295
  30. package/libs/pixel/built/debug/binary.js +8 -8
  31. package/libs/power/built/debug/binary.js +8 -8
  32. package/libs/proximity/built/debug/binary.js +8 -8
  33. package/libs/pulse/built/debug/binary.js +8 -8
  34. package/libs/radio/built/debug/binary.js +8 -8
  35. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  36. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  37. package/libs/screen/built/debug/binary.js +50 -50
  38. package/libs/screen/sim/image.ts +4 -3
  39. package/libs/servo/built/debug/binary.js +8 -8
  40. package/libs/sprite-scaling/built/debug/binary.js +7306 -7295
  41. package/libs/storyboard/built/debug/binary.js +7304 -7293
  42. package/libs/tests/built/debug/binary.js +15 -15
  43. package/libs/thermometer/built/debug/binary.js +8 -8
  44. package/package.json +1 -1
@@ -316,6 +316,10 @@ class Sprite extends sprites.BaseSprite {
316
316
  constructor(img: Image) {
317
317
  super(scene.SPRITE_Z);
318
318
 
319
+ if (!img) {
320
+ throw "Sprite image cannot be undefined or null";
321
+ }
322
+
319
323
  this._x = Fx8(screen.width - img.width >> 1);
320
324
  this._y = Fx8(screen.height - img.height >> 1);
321
325
  this._lastX = this._x;
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P24439(s) {
59
+ function _main___P24453(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___24682 = (undefined);
70
- globals._pollEventQueue___24695 = (undefined);
69
+ globals._intervals___24697 = (undefined);
70
+ globals._pollEventQueue___24710 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P24439.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"gamepad.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P24439.continuations = [ ]
75
+ _main___P24453.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"gamepad.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P24453.continuations = [ ]
77
77
 
78
- function _main___P24439_mk(s) {
78
+ function _main___P24453_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P24439, depth: s.depth + 1,
81
+ parent: s, fn: _main___P24453, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P24439_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P24439
91
+ return _main___P24453
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P29725(s) {
59
+ function _main___P29742(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___29968 = (undefined);
70
- globals._pollEventQueue___29981 = (undefined);
69
+ globals._intervals___29986 = (undefined);
70
+ globals._pollEventQueue___29999 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P29725.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"keyboard.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P29725.continuations = [ ]
75
+ _main___P29742.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"keyboard.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P29742.continuations = [ ]
77
77
 
78
- function _main___P29725_mk(s) {
78
+ function _main___P29742_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P29725, depth: s.depth + 1,
81
+ parent: s, fn: _main___P29742, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P29725_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P29725
91
+ return _main___P29742
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P49482(s) {
59
+ function _main___P49504(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___49725 = (undefined);
70
- globals._pollEventQueue___49738 = (undefined);
69
+ globals._intervals___49748 = (undefined);
70
+ globals._pollEventQueue___49761 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P49482.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"characterlcd.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P49482.continuations = [ ]
75
+ _main___P49504.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"characterlcd.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P49504.continuations = [ ]
77
77
 
78
- function _main___P49482_mk(s) {
78
+ function _main___P49504_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P49482, depth: s.depth + 1,
81
+ parent: s, fn: _main___P49504, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P49482_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P49482
91
+ return _main___P49504
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P5350(s) {
59
+ function _main___P5353(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___5593 = (undefined);
70
- globals._pollEventQueue___5606 = (undefined);
69
+ globals._intervals___5597 = (undefined);
70
+ globals._pollEventQueue___5610 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P5350.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P5350.continuations = [ ]
75
+ _main___P5353.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P5353.continuations = [ ]
77
77
 
78
- function _main___P5350_mk(s) {
78
+ function _main___P5353_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P5350, depth: s.depth + 1,
81
+ parent: s, fn: _main___P5353, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P5350_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P5350
91
+ return _main___P5353
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P100795(s) {
59
+ function _main___P100832(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___101038 = (undefined);
70
- globals._pollEventQueue___101051 = (undefined);
69
+ globals._intervals___101076 = (undefined);
70
+ globals._pollEventQueue___101089 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P100795.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"tsl2591.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P100795.continuations = [ ]
75
+ _main___P100832.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"tsl2591.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P100832.continuations = [ ]
77
77
 
78
- function _main___P100795_mk(s) {
78
+ function _main___P100832_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P100795, depth: s.depth + 1,
81
+ parent: s, fn: _main___P100832, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P100795_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P100795
91
+ return _main___P100832
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P60801(s) {
59
+ function _main___P60829(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___61044 = (undefined);
70
- globals._pollEventQueue___61057 = (undefined);
69
+ globals._intervals___61073 = (undefined);
70
+ globals._pollEventQueue___61086 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P60801.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"lora.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P60801.continuations = [ ]
75
+ _main___P60829.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"lora.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P60829.continuations = [ ]
77
77
 
78
- function _main___P60801_mk(s) {
78
+ function _main___P60829_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P60801, depth: s.depth + 1,
81
+ parent: s, fn: _main___P60829, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P60801_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P60801
91
+ return _main___P60829
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P197221(s) {
59
+ function _main___P197282(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___197464 = (undefined);
70
- globals._pollEventQueue___197477 = (undefined);
69
+ globals._intervals___197526 = (undefined);
70
+ globals._pollEventQueue___197539 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P197221.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"keypad.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P197221.continuations = [ ]
75
+ _main___P197282.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"keypad.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P197282.continuations = [ ]
77
77
 
78
- function _main___P197221_mk(s) {
78
+ function _main___P197282_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P197221, depth: s.depth + 1,
81
+ parent: s, fn: _main___P197282, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P197221_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P197221
91
+ return _main___P197282
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P9194(s) {
59
+ function _main___P9199(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___9437 = (undefined);
70
- globals._pollEventQueue___9450 = (undefined);
69
+ globals._intervals___9443 = (undefined);
70
+ globals._pollEventQueue___9456 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P9194.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P9194.continuations = [ ]
75
+ _main___P9199.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P9199.continuations = [ ]
77
77
 
78
- function _main___P9194_mk(s) {
78
+ function _main___P9199_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P9194, depth: s.depth + 1,
81
+ parent: s, fn: _main___P9199, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P9194_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P9194
91
+ return _main___P9199
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P27970(s) {
59
+ function _main___P27986(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___28213 = (undefined);
70
- globals._pollEventQueue___28226 = (undefined);
69
+ globals._intervals___28230 = (undefined);
70
+ globals._pollEventQueue___28243 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P27970.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"mouse.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P27970.continuations = [ ]
75
+ _main___P27986.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"mouse.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P27986.continuations = [ ]
77
77
 
78
- function _main___P27970_mk(s) {
78
+ function _main___P27986_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P27970, depth: s.depth + 1,
81
+ parent: s, fn: _main___P27986, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P27970_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P27970
91
+ return _main___P27986
92
92
  })