pxt-common-packages 10.1.1 → 10.1.4

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 (40) hide show
  1. package/built/common-sim.js +2 -2
  2. package/libs/azureiot/built/debug/binary.js +461 -461
  3. package/libs/color/built/debug/binary.js +8 -8
  4. package/libs/color-sensor/built/debug/binary.js +8 -8
  5. package/libs/controller/built/debug/binary.js +6898 -6898
  6. package/libs/controller---none/built/debug/binary.js +6878 -6878
  7. package/libs/datalogger/built/debug/binary.js +63 -63
  8. package/libs/edge-connector/built/debug/binary.js +8 -8
  9. package/libs/esp32/built/debug/binary.js +462 -462
  10. package/libs/game/_locales/game-jsdoc-strings.json +4 -0
  11. package/libs/game/_locales/game-strings.json +2 -0
  12. package/libs/game/built/debug/binary.js +6817 -6817
  13. package/libs/game/docs/reference/effects/clear-particles.md +37 -0
  14. package/libs/game/docs/reference/info/change-score-by.md +2 -1
  15. package/libs/game/docs/reference/info/on-score.md +72 -0
  16. package/libs/game/docs/reference/info/score.md +2 -1
  17. package/libs/game/docs/reference/info/set-score.md +2 -1
  18. package/libs/game/info.ts +53 -0
  19. package/libs/game/sim/keymap.ts +2 -2
  20. package/libs/lcd/built/debug/binary.js +8 -8
  21. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  22. package/libs/lora/built/debug/binary.js +8 -8
  23. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  24. package/libs/mqtt/built/debug/binary.js +176 -176
  25. package/libs/net/built/debug/binary.js +176 -176
  26. package/libs/net-game/built/debug/binary.js +8406 -8406
  27. package/libs/palette/built/debug/binary.js +6816 -6816
  28. package/libs/pixel/built/debug/binary.js +8 -8
  29. package/libs/power/built/debug/binary.js +8 -8
  30. package/libs/proximity/built/debug/binary.js +8 -8
  31. package/libs/radio/built/debug/binary.js +8 -8
  32. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  33. package/libs/radio-broadcast/docs/reference/radio-broadcast.md +21 -0
  34. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  35. package/libs/screen/built/debug/binary.js +50 -50
  36. package/libs/servo/built/debug/binary.js +8 -8
  37. package/libs/servo/docs/reference/servo.md +41 -0
  38. package/libs/sprite-scaling/built/debug/binary.js +6816 -6816
  39. package/libs/storyboard/built/debug/binary.js +6816 -6816
  40. package/package.json +1 -1
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P55644(s) {
59
+ function _main___P55649(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___55887 = (undefined);
70
- globals._pollEventQueue___55900 = (undefined);
69
+ globals._intervals___55892 = (undefined);
70
+ globals._pollEventQueue___55905 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P55644.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/light/neopixel.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P55644.continuations = [ ]
75
+ _main___P55649.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/light/neopixel.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P55649.continuations = [ ]
77
77
 
78
- function _main___P55644_mk(s) {
78
+ function _main___P55649_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P55644, depth: s.depth + 1,
81
+ parent: s, fn: _main___P55649, 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___P55644_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P55644
91
+ return _main___P55649
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___P62492(s) {
59
+ function _main___P62497(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___62735 = (undefined);
70
- globals._pollEventQueue___62748 = (undefined);
69
+ globals._intervals___62740 = (undefined);
70
+ globals._pollEventQueue___62753 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P62492.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"power.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P62492.continuations = [ ]
75
+ _main___P62497.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"power.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P62497.continuations = [ ]
77
77
 
78
- function _main___P62492_mk(s) {
78
+ function _main___P62497_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P62492, depth: s.depth + 1,
81
+ parent: s, fn: _main___P62497, 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___P62492_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P62492
91
+ return _main___P62497
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___P100944(s) {
59
+ function _main___P100959(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___101187 = (undefined);
70
- globals._pollEventQueue___101200 = (undefined);
69
+ globals._intervals___101202 = (undefined);
70
+ globals._pollEventQueue___101215 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P100944.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"vl53l0x.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P100944.continuations = [ ]
75
+ _main___P100959.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"vl53l0x.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P100959.continuations = [ ]
77
77
 
78
- function _main___P100944_mk(s) {
78
+ function _main___P100959_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P100944, depth: s.depth + 1,
81
+ parent: s, fn: _main___P100959, 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___P100944_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P100944
91
+ return _main___P100959
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___P184374(s) {
59
+ function _main___P184409(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___184617 = (undefined);
70
- globals._pollEventQueue___184630 = (undefined);
69
+ globals._intervals___184652 = (undefined);
70
+ globals._pollEventQueue___184665 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P184374.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P184374.continuations = [ ]
75
+ _main___P184409.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P184409.continuations = [ ]
77
77
 
78
- function _main___P184374_mk(s) {
78
+ function _main___P184409_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P184374, depth: s.depth + 1,
81
+ parent: s, fn: _main___P184409, 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___P184374_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P184374
91
+ return _main___P184409
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___P186198(s) {
59
+ function _main___P186233(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___186441 = (undefined);
70
- globals._pollEventQueue___186454 = (undefined);
69
+ globals._intervals___186476 = (undefined);
70
+ globals._pollEventQueue___186489 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P186198.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"radio-broadcast.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P186198.continuations = [ ]
75
+ _main___P186233.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"radio-broadcast.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P186233.continuations = [ ]
77
77
 
78
- function _main___P186198_mk(s) {
78
+ function _main___P186233_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P186198, depth: s.depth + 1,
81
+ parent: s, fn: _main___P186233, 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___P186198_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P186198
91
+ return _main___P186233
92
92
  })
@@ -0,0 +1,21 @@
1
+ # Radio Broadcast
2
+
3
+ The Radio Broadcast extension has blocks for sending to and receiving messages from all the @boardname@ boards nearby. Just two blocks are used, one to send a broadcast message and another to run code when a broadcast message is received.
4
+
5
+ A message, which is a [number](/types/number), is sent to, or received by all nearby @boardname@ boards regardless of which [Group](/reference/radio/set-group) number they are transmitting or receiving on.
6
+
7
+ ## Blocks in this extension
8
+
9
+ ```cards
10
+ radio.sendMessage(0)
11
+ radio.onReceivedMessage(0, function() {})
12
+ ```
13
+
14
+ ## See Also
15
+
16
+ [send message](/reference/radio/send-message),
17
+ [send value](/reference/radio/on-received-message)
18
+
19
+ ```package
20
+ radio-broadcast
21
+ ```
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P167633(s) {
59
+ function _main___P167663(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___167876 = (undefined);
70
- globals._pollEventQueue___167889 = (undefined);
69
+ globals._intervals___167906 = (undefined);
70
+ globals._pollEventQueue___167919 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P167633.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P167633.continuations = [ ]
75
+ _main___P167663.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P167663.continuations = [ ]
77
77
 
78
- function _main___P167633_mk(s) {
78
+ function _main___P167663_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P167633, depth: s.depth + 1,
81
+ parent: s, fn: _main___P167663, 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___P167633_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P167633
91
+ return _main___P167663
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___P50263(s) {
59
+ function _main___P50268(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,29 +66,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___50506 = (undefined);
70
- globals._pollEventQueue___50519 = (undefined);
71
- globals.__updated___50748 = (false);
72
- r0 = pxsim.control.runInParallel(control___screen_inline__P50753);
69
+ globals._intervals___50511 = (undefined);
70
+ globals._pollEventQueue___50524 = (undefined);
71
+ globals.__updated___50753 = (false);
72
+ r0 = pxsim.control.runInParallel(control___screen_inline__P50758);
73
73
  r0 = pxsim.image.create(178, 128);
74
- globals.screen___50776 = (r0);
75
- s.tmp_0 = control___screen_setupUpdate__P50750_mk(s);
76
- s.tmp_0.arg0 = _screen_internal_inline__P50781;
74
+ globals.screen___50781 = (r0);
75
+ s.tmp_0 = control___screen_setupUpdate__P50755_mk(s);
76
+ s.tmp_0.arg0 = _screen_internal_inline__P50786;
77
77
  s.callLocIdx = 4; s.pc = 1; return s.tmp_0;
78
78
  case 1:
79
79
  r0 = s.retval;
80
- globals.control_EventContext_onStats___50574 = (_screen_internal_inline__P50786);
80
+ globals.control_EventContext_onStats___50579 = (_screen_internal_inline__P50791);
81
81
  r0 = undefined;
82
82
  return leave(s, r0)
83
83
  default: oops()
84
84
  } } }
85
- _main___P50263.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"imagesoverrides.ts","functionName":"<main>","argumentNames":[]}
86
- _main___P50263.continuations = [ ]
85
+ _main___P50268.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"imagesoverrides.ts","functionName":"<main>","argumentNames":[]}
86
+ _main___P50268.continuations = [ ]
87
87
 
88
- function _main___P50263_mk(s) {
88
+ function _main___P50268_mk(s) {
89
89
  checkStack(s.depth);
90
90
  return {
91
- parent: s, fn: _main___P50263, depth: s.depth + 1,
91
+ parent: s, fn: _main___P50268, depth: s.depth + 1,
92
92
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
93
93
  tmp_0: undefined,
94
94
  } }
@@ -97,7 +97,7 @@ function _main___P50263_mk(s) {
97
97
 
98
98
 
99
99
 
100
- function control___screen_inline__P50753(s) {
100
+ function control___screen_inline__P50758(s) {
101
101
  let r0 = s.r0, step = s.pc;
102
102
  s.pc = -1;
103
103
 
@@ -110,23 +110,23 @@ switch (step) {
110
110
  case 1:
111
111
  r0 = pxsim_numops_toBoolDecr(true);
112
112
  if (!r0) { step = 4; continue; }
113
- globals.__updated___50748 = (false);
114
- s.tmp_0 = pause__P50583_mk(s);
113
+ globals.__updated___50753 = (false);
114
+ s.tmp_0 = pause__P50588_mk(s);
115
115
  s.tmp_0.arg0 = 200;
116
116
  s.callLocIdx = 2; s.pc = 5; return s.tmp_0;
117
117
  case 5:
118
118
  r0 = s.retval;
119
- r0 = pxsim_numops_toBoolDecr(globals.__updated___50748);
119
+ r0 = pxsim_numops_toBoolDecr(globals.__updated___50753);
120
120
  s.tmp_1 = r0;
121
121
  r0 = pxsim_Boolean__bang(s.tmp_1);
122
122
  s.tmp_0 = r0;
123
123
  r0 = pxsim_numops_toBoolDecr(s.tmp_0);
124
124
  if (!r0) { step = 2; continue; }
125
- s.tmp_2 = control___screen_update__P50749_mk(s);
125
+ s.tmp_2 = control___screen_update__P50754_mk(s);
126
126
  s.callLocIdx = 3; s.pc = 6; return s.tmp_2;
127
127
  case 6:
128
128
  r0 = s.retval;
129
- globals.__updated___50748 = (true);
129
+ globals.__updated___50753 = (true);
130
130
  case 2:
131
131
  case 3:
132
132
  { step = 1; continue; }
@@ -135,12 +135,12 @@ switch (step) {
135
135
  return leave(s, r0)
136
136
  default: oops()
137
137
  } } }
138
- control___screen_inline__P50753.info = {"start":396,"length":211,"line":17,"column":26,"endLine":26,"endColumn":5,"fileName":"frame.ts","functionName":"inline","argumentNames":[]}
138
+ control___screen_inline__P50758.info = {"start":396,"length":211,"line":17,"column":26,"endLine":26,"endColumn":5,"fileName":"frame.ts","functionName":"inline","argumentNames":[]}
139
139
 
140
- function control___screen_inline__P50753_mk(s) {
140
+ function control___screen_inline__P50758_mk(s) {
141
141
  checkStack(s.depth);
142
142
  return {
143
- parent: s, fn: control___screen_inline__P50753, depth: s.depth + 1,
143
+ parent: s, fn: control___screen_inline__P50758, depth: s.depth + 1,
144
144
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
145
145
  tmp_0: undefined,
146
146
  tmp_1: undefined,
@@ -151,7 +151,7 @@ function control___screen_inline__P50753_mk(s) {
151
151
 
152
152
 
153
153
 
154
- function _screen_internal_inline__P50781(s) {
154
+ function _screen_internal_inline__P50786(s) {
155
155
  let r0 = s.r0, step = s.pc;
156
156
  s.pc = -1;
157
157
 
@@ -161,17 +161,17 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
161
161
  switch (step) {
162
162
  case 0:
163
163
 
164
- r0 = pxsim_pxtcore.updateScreen(globals.screen___50776);
164
+ r0 = pxsim_pxtcore.updateScreen(globals.screen___50781);
165
165
  r0 = undefined;
166
166
  return leave(s, r0)
167
167
  default: oops()
168
168
  } } }
169
- _screen_internal_inline__P50781.info = {"start":327,"length":26,"line":8,"column":33,"endLine":8,"endColumn":59,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":[]}
169
+ _screen_internal_inline__P50786.info = {"start":327,"length":26,"line":8,"column":33,"endLine":8,"endColumn":59,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":[]}
170
170
 
171
- function _screen_internal_inline__P50781_mk(s) {
171
+ function _screen_internal_inline__P50786_mk(s) {
172
172
  checkStack(s.depth);
173
173
  return {
174
- parent: s, fn: _screen_internal_inline__P50781, depth: s.depth + 1,
174
+ parent: s, fn: _screen_internal_inline__P50786, depth: s.depth + 1,
175
175
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
176
176
  } }
177
177
 
@@ -179,7 +179,7 @@ function _screen_internal_inline__P50781_mk(s) {
179
179
 
180
180
 
181
181
 
182
- function _screen_internal_inline__P50786(s) {
182
+ function _screen_internal_inline__P50791(s) {
183
183
  let r0 = s.r0, step = s.pc;
184
184
  s.pc = -1;
185
185
 
@@ -198,12 +198,12 @@ switch (step) {
198
198
  return leave(s, r0)
199
199
  default: oops()
200
200
  } } }
201
- _screen_internal_inline__P50786.info = {"start":390,"length":56,"line":9,"column":35,"endLine":11,"endColumn":5,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":["msg"]}
201
+ _screen_internal_inline__P50791.info = {"start":390,"length":56,"line":9,"column":35,"endLine":11,"endColumn":5,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":["msg"]}
202
202
 
203
- function _screen_internal_inline__P50786_mk(s) {
203
+ function _screen_internal_inline__P50791_mk(s) {
204
204
  checkStack(s.depth);
205
205
  return {
206
- parent: s, fn: _screen_internal_inline__P50786, depth: s.depth + 1,
206
+ parent: s, fn: _screen_internal_inline__P50791, depth: s.depth + 1,
207
207
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
208
208
  arg0: undefined,
209
209
  } }
@@ -212,7 +212,7 @@ function _screen_internal_inline__P50786_mk(s) {
212
212
 
213
213
 
214
214
 
215
- function control___screen_setupUpdate__P50750(s) {
215
+ function control___screen_setupUpdate__P50755(s) {
216
216
  let r0 = s.r0, step = s.pc;
217
217
  s.pc = -1;
218
218
 
@@ -226,8 +226,8 @@ switch (step) {
226
226
  s.arg0 = (s.lambdaArgs[0]);
227
227
  s.lambdaArgs = null;
228
228
  }
229
- globals.__updated___50748 = (true);
230
- globals.__update___50746 = (s.arg0);
229
+ globals.__updated___50753 = (true);
230
+ globals.__update___50751 = (s.arg0);
231
231
  s.tmp_0 = lambda_1_mk(s);
232
232
  s.tmp_0.argL = s.arg0;
233
233
  setupLambda(s.tmp_0, s.tmp_0.argL);
@@ -238,12 +238,12 @@ switch (step) {
238
238
  return leave(s, r0)
239
239
  default: oops()
240
240
  } } }
241
- control___screen_setupUpdate__P50750.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"frame.ts","functionName":"setupUpdate","argumentNames":["update"]}
241
+ control___screen_setupUpdate__P50755.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"frame.ts","functionName":"setupUpdate","argumentNames":["update"]}
242
242
 
243
- function control___screen_setupUpdate__P50750_mk(s) {
243
+ function control___screen_setupUpdate__P50755_mk(s) {
244
244
  checkStack(s.depth);
245
245
  return {
246
- parent: s, fn: control___screen_setupUpdate__P50750, depth: s.depth + 1,
246
+ parent: s, fn: control___screen_setupUpdate__P50755, depth: s.depth + 1,
247
247
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
248
248
  tmp_0: undefined,
249
249
  arg0: undefined,
@@ -253,7 +253,7 @@ function control___screen_setupUpdate__P50750_mk(s) {
253
253
 
254
254
 
255
255
 
256
- function control___screen_update__P50749(s) {
256
+ function control___screen_update__P50754(s) {
257
257
  let r0 = s.r0, step = s.pc;
258
258
  s.pc = -1;
259
259
 
@@ -263,27 +263,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
263
263
  switch (step) {
264
264
  case 0:
265
265
 
266
- r0 = pxsim_numops_toBoolDecr(globals.__update___50746);
266
+ r0 = pxsim_numops_toBoolDecr(globals.__update___50751);
267
267
  if (!r0) { step = 1; continue; }
268
268
  s.tmp_0 = lambda_1_mk(s);
269
- s.tmp_0.argL = globals.__update___50746;
269
+ s.tmp_0.argL = globals.__update___50751;
270
270
  setupLambda(s.tmp_0, s.tmp_0.argL);
271
271
  s.callLocIdx = 0; s.pc = 3; return s.tmp_0;
272
272
  case 3:
273
273
  r0 = s.retval;
274
274
  case 1:
275
275
  case 2:
276
- globals.__updated___50748 = (true);
276
+ globals.__updated___50753 = (true);
277
277
  r0 = undefined;
278
278
  return leave(s, r0)
279
279
  default: oops()
280
280
  } } }
281
- control___screen_update__P50749.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"frame.ts","functionName":"update","argumentNames":[]}
281
+ control___screen_update__P50754.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"frame.ts","functionName":"update","argumentNames":[]}
282
282
 
283
- function control___screen_update__P50749_mk(s) {
283
+ function control___screen_update__P50754_mk(s) {
284
284
  checkStack(s.depth);
285
285
  return {
286
- parent: s, fn: control___screen_update__P50749, depth: s.depth + 1,
286
+ parent: s, fn: control___screen_update__P50754, depth: s.depth + 1,
287
287
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
288
288
  tmp_0: undefined,
289
289
  } }
@@ -292,7 +292,7 @@ function control___screen_update__P50749_mk(s) {
292
292
 
293
293
 
294
294
 
295
- function pause__P50583(s) {
295
+ function pause__P50588(s) {
296
296
  let r0 = s.r0, step = s.pc;
297
297
  s.pc = -1;
298
298
 
@@ -316,12 +316,12 @@ switch (step) {
316
316
  return leave(s, r0)
317
317
  default: oops()
318
318
  } } }
319
- pause__P50583.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]}
319
+ pause__P50588.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]}
320
320
 
321
- function pause__P50583_mk(s) {
321
+ function pause__P50588_mk(s) {
322
322
  checkStack(s.depth);
323
323
  return {
324
- parent: s, fn: pause__P50583, depth: s.depth + 1,
324
+ parent: s, fn: pause__P50588, depth: s.depth + 1,
325
325
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
326
326
  arg0: undefined,
327
327
  } }
@@ -343,7 +343,7 @@ function lambda_1_mk(s) {
343
343
  } }
344
344
 
345
345
 
346
- const breakpoints = setupDebugger(1, ["__updated___50748","screen___50776","__update___50746"])
346
+ const breakpoints = setupDebugger(1, ["__updated___50753","screen___50781","__update___50751"])
347
347
 
348
- return _main___P50263
348
+ return _main___P50268
349
349
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P52175(s) {
59
+ function _main___P52180(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___52418 = (undefined);
70
- globals._pollEventQueue___52431 = (undefined);
69
+ globals._intervals___52423 = (undefined);
70
+ globals._pollEventQueue___52436 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P52175.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P52175.continuations = [ ]
75
+ _main___P52180.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P52180.continuations = [ ]
77
77
 
78
- function _main___P52175_mk(s) {
78
+ function _main___P52180_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P52175, depth: s.depth + 1,
81
+ parent: s, fn: _main___P52180, 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___P52175_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P52175
91
+ return _main___P52180
92
92
  })
@@ -0,0 +1,41 @@
1
+ # Servo
2
+
3
+ This extension has blocks to rotate and run servos connected to the pins.
4
+
5
+ ### ~ hint
6
+
7
+ #### How servos work
8
+
9
+ To better understand how servos work and how they are controlled, take a few minutes to read this [Brief Guide to Servos](https://www.kitronik.co.uk/pdf/a-brief-guide-to-servos.pdf).
10
+
11
+ Also, watch this video for a further look into how motors and servos work.
12
+
13
+ https://www.youtube.com/watch?v=okxooamdAP4
14
+
15
+ ### ~
16
+
17
+ ## Blocks in this extension
18
+
19
+ ```cards
20
+ servos.P0.setPulse(1500)
21
+ servos.P0.setAngle(90)
22
+ servos.P0.run(50)
23
+ servos.P0.stop()
24
+ servos.P0.setRange(0, 180)
25
+ servos.P0.setStopOnNeutral(false)
26
+ ```
27
+
28
+ ## See also
29
+
30
+ [set pulse](/reference/servos/set-pulse),
31
+ [set angle](/reference/servos/set-angle),
32
+ [run](/reference/servos/run),
33
+ [stop](/reference/servos/stop),
34
+ [set range](/reference/servos/set-range),
35
+ [set stop on neutral](/reference/servos/set-stop-on-neutral)
36
+
37
+ [Brief Guide to Servos](https://www.kitronik.co.uk/pdf/a-brief-guide-to-servos.pdf)
38
+
39
+ ```package
40
+ servo
41
+ ```