pxt-common-packages 13.2.6 → 13.2.8
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.
- package/libs/azureiot/built/debug/binary.js +5 -5
- package/libs/base/console.ts +2 -0
- package/libs/base/control.cpp +2 -0
- package/libs/base/control.ts +3 -0
- package/libs/base/eventcontext.ts +1 -0
- package/libs/base/loops.cpp +1 -0
- package/libs/base/math.ts +2 -0
- package/libs/base/pause.ts +1 -0
- package/libs/color/colors.ts +3 -0
- package/libs/controller/built/debug/binary.js +27 -27
- package/libs/controller---none/built/debug/binary.js +27 -27
- package/libs/esp32/built/debug/binary.js +5 -5
- package/libs/game/built/debug/binary.js +27 -27
- package/libs/microphone/microphone.cpp +1 -0
- package/libs/microphone/shims.d.ts +1 -0
- package/libs/mixer/instrument.ts +31 -27
- package/libs/net-game/built/debug/binary.js +28 -28
- package/libs/palette/built/debug/binary.js +27 -27
- package/libs/radio/radio.cpp +4 -0
- package/libs/radio/radio.ts +5 -0
- package/libs/radio/shims.d.ts +4 -0
- package/libs/radio-broadcast/radio-broadcast.ts +2 -0
- package/libs/screen/built/debug/binary.js +2 -2
- package/libs/servo/servo.ts +5 -0
- package/libs/sprite-scaling/built/debug/binary.js +27 -27
- package/libs/storyboard/built/debug/binary.js +27 -27
- package/package.json +1 -1
package/libs/mixer/instrument.ts
CHANGED
|
@@ -619,6 +619,18 @@ namespace music.sequencer {
|
|
|
619
619
|
timePoints.push(nextALTime);
|
|
620
620
|
nextALTime += ampLFOInterval;
|
|
621
621
|
}
|
|
622
|
+
// This can happen if our attack + decay time is greater than gate length. Make sure we start
|
|
623
|
+
// the release stage on time
|
|
624
|
+
else if (time < gateLength) {
|
|
625
|
+
time = gateLength;
|
|
626
|
+
timePoints.push(gateLength);
|
|
627
|
+
}
|
|
628
|
+
// If we reach this point, the only thing left is the end of the release stage
|
|
629
|
+
else {
|
|
630
|
+
time = totalDuration;
|
|
631
|
+
timePoints.push(totalDuration);
|
|
632
|
+
}
|
|
633
|
+
|
|
622
634
|
|
|
623
635
|
|
|
624
636
|
if (time >= totalDuration) {
|
|
@@ -669,18 +681,18 @@ namespace music.sequencer {
|
|
|
669
681
|
|
|
670
682
|
let nextAmp: number;
|
|
671
683
|
let nextPitch: number;
|
|
684
|
+
let ptr = 0;
|
|
672
685
|
const out = control.createBuffer(BUFFER_SIZE * timePoints.length);
|
|
673
686
|
for (let i = 1; i < timePoints.length; i++) {
|
|
674
687
|
if (timePoints[i] - prevTime < 5) {
|
|
675
|
-
prevTime = timePoints[i];
|
|
676
688
|
continue;
|
|
677
689
|
}
|
|
678
690
|
|
|
679
691
|
nextAmp = instrumentVolumeAtTime(instrument, gateLength, timePoints[i], volume) | 0;
|
|
680
692
|
nextPitch = instrumentPitchAtTime(instrument, noteFrequency, gateLength, timePoints[i]) | 0
|
|
681
|
-
addNote(
|
|
693
|
+
ptr = addNote(
|
|
682
694
|
out,
|
|
683
|
-
|
|
695
|
+
ptr,
|
|
684
696
|
(timePoints[i] - prevTime) | 0,
|
|
685
697
|
prevAmp,
|
|
686
698
|
nextAmp,
|
|
@@ -697,17 +709,19 @@ namespace music.sequencer {
|
|
|
697
709
|
|
|
698
710
|
// Finally, add one extra step to move the amplitude to 0 without
|
|
699
711
|
// clipping just in case the amp LFO caused it to be nonzero
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
712
|
+
if (prevAmp > 0) {
|
|
713
|
+
ptr = addNote(
|
|
714
|
+
out,
|
|
715
|
+
ptr,
|
|
716
|
+
10,
|
|
717
|
+
prevAmp,
|
|
718
|
+
0,
|
|
719
|
+
instrument.waveform,
|
|
720
|
+
prevPitch,
|
|
721
|
+
255,
|
|
722
|
+
prevPitch
|
|
723
|
+
)
|
|
724
|
+
}
|
|
711
725
|
return out;
|
|
712
726
|
}
|
|
713
727
|
|
|
@@ -783,7 +797,7 @@ namespace music.sequencer {
|
|
|
783
797
|
* of the sound instructions will be longer than this if the amplitude envelope of the
|
|
784
798
|
* instrument has a nonzero release time
|
|
785
799
|
*/
|
|
786
|
-
function envelopeValueAtTime(envelope: Envelope, time: number, gateLength: number) {
|
|
800
|
+
function envelopeValueAtTime(envelope: Envelope, time: number, gateLength: number): number {
|
|
787
801
|
// ADSR envelopes consist of 4 stages. They are (in order):
|
|
788
802
|
// 1. The attack stage, where the value starts at 0 and rises to the maximum value
|
|
789
803
|
// 2. The decay stage, where the value falls from the maximum value to the sustain value
|
|
@@ -796,19 +810,9 @@ namespace music.sequencer {
|
|
|
796
810
|
// First check to see if we are already in the release stage
|
|
797
811
|
if (time > gateLength) {
|
|
798
812
|
if (time - gateLength > envelope.release) return 0;
|
|
799
|
-
|
|
800
|
-
// Did the gate length end before the attack stage finished?
|
|
801
|
-
else if (time < envelope.attack) {
|
|
802
|
-
const height = (envelope.amplitude / envelope.attack) * gateLength;
|
|
803
|
-
return height - ((height / envelope.release) * (time - gateLength))
|
|
804
|
-
}
|
|
805
|
-
// Did the gate length end before the decay stage finished?
|
|
806
|
-
else if (time < envelope.attack + envelope.decay) {
|
|
807
|
-
const height2 = envelope.amplitude - ((envelope.amplitude - adjustedSustain) / envelope.decay) * (gateLength - envelope.attack);
|
|
808
|
-
return height2 - ((height2 / envelope.release) * (time - gateLength))
|
|
809
|
-
}
|
|
810
813
|
else {
|
|
811
|
-
|
|
814
|
+
const releaseStartLevel = envelopeValueAtTime(envelope, gateLength, gateLength);
|
|
815
|
+
return releaseStartLevel - (releaseStartLevel / envelope.release) * (time - gateLength)
|
|
812
816
|
}
|
|
813
817
|
}
|
|
814
818
|
else if (time < envelope.attack) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// total=
|
|
1
|
+
// total=1991747 new=74.73% cached=0.00% other=25.27%
|
|
2
2
|
(function (ectx) {
|
|
3
3
|
'use strict';
|
|
4
4
|
const runtime = ectx.runtime;
|
|
@@ -3174,7 +3174,7 @@ switch (step) {
|
|
|
3174
3174
|
return leave(s, r0)
|
|
3175
3175
|
default: oops()
|
|
3176
3176
|
} } }
|
|
3177
|
-
control_popEventContext__P114927.info = {"start":
|
|
3177
|
+
control_popEventContext__P114927.info = {"start":7802,"length":413,"line":237,"column":4,"endLine":251,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]}
|
|
3178
3178
|
|
|
3179
3179
|
function control_popEventContext__P114927_mk(s) {
|
|
3180
3180
|
checkStack(s.depth);
|
|
@@ -3241,7 +3241,7 @@ switch (step) {
|
|
|
3241
3241
|
return leave(s, r0)
|
|
3242
3242
|
default: oops()
|
|
3243
3243
|
} } }
|
|
3244
|
-
control_EventContext_register__P114913.info = {"start":
|
|
3244
|
+
control_EventContext_register__P114913.info = {"start":4620,"length":138,"line":136,"column":8,"endLine":140,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]}
|
|
3245
3245
|
|
|
3246
3246
|
function control_EventContext_register__P114913_mk(s) {
|
|
3247
3247
|
checkStack(s.depth);
|
|
@@ -3300,7 +3300,7 @@ switch (step) {
|
|
|
3300
3300
|
return leave(s, r0)
|
|
3301
3301
|
default: oops()
|
|
3302
3302
|
} } }
|
|
3303
|
-
control_EventContext_registerFrameCallbacks__P114912.info = {"start":
|
|
3303
|
+
control_EventContext_registerFrameCallbacks__P114912.info = {"start":3715,"length":895,"line":110,"column":8,"endLine":134,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]}
|
|
3304
3304
|
|
|
3305
3305
|
function control_EventContext_registerFrameCallbacks__P114912_mk(s) {
|
|
3306
3306
|
checkStack(s.depth);
|
|
@@ -3376,7 +3376,7 @@ switch (step) {
|
|
|
3376
3376
|
return leave(s, r0)
|
|
3377
3377
|
default: oops()
|
|
3378
3378
|
} } }
|
|
3379
|
-
control_EventContext_registerFrameCallbacks_inline__P117628.info = {"start":
|
|
3379
|
+
control_EventContext_registerFrameCallbacks_inline__P117628.info = {"start":3876,"length":723,"line":114,"column":34,"endLine":133,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]}
|
|
3380
3380
|
|
|
3381
3381
|
function control_EventContext_registerFrameCallbacks_inline__P117628_mk(s) {
|
|
3382
3382
|
checkStack(s.depth);
|
|
@@ -3410,7 +3410,7 @@ switch (step) {
|
|
|
3410
3410
|
return leave(s, r0)
|
|
3411
3411
|
default: oops()
|
|
3412
3412
|
} } }
|
|
3413
|
-
control_EventContext_registerFrameCallbacks_inline__P117634.info = {"start":
|
|
3413
|
+
control_EventContext_registerFrameCallbacks_inline__P117634.info = {"start":4107,"length":28,"line":118,"column":31,"endLine":118,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]}
|
|
3414
3414
|
|
|
3415
3415
|
function control_EventContext_registerFrameCallbacks_inline__P117634_mk(s) {
|
|
3416
3416
|
checkStack(s.depth);
|
|
@@ -3677,7 +3677,7 @@ switch (step) {
|
|
|
3677
3677
|
return leave(s, r0)
|
|
3678
3678
|
default: oops()
|
|
3679
3679
|
} } }
|
|
3680
|
-
control_EventContext_runCallbacks__P114911.info = {"start":
|
|
3680
|
+
control_EventContext_runCallbacks__P114911.info = {"start":2267,"length":1395,"line":76,"column":8,"endLine":107,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]}
|
|
3681
3681
|
|
|
3682
3682
|
function control_EventContext_runCallbacks__P114911_mk(s) {
|
|
3683
3683
|
checkStack(s.depth);
|
|
@@ -3747,7 +3747,7 @@ switch (step) {
|
|
|
3747
3747
|
return leave(s, r0)
|
|
3748
3748
|
default: oops()
|
|
3749
3749
|
} } }
|
|
3750
|
-
control_EventHandler_register__P114905.info = {"start":
|
|
3750
|
+
control_EventHandler_register__P114905.info = {"start":1008,"length":165,"line":31,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]}
|
|
3751
3751
|
|
|
3752
3752
|
function control_EventHandler_register__P114905_mk(s) {
|
|
3753
3753
|
checkStack(s.depth);
|
|
@@ -3797,7 +3797,7 @@ switch (step) {
|
|
|
3797
3797
|
return leave(s, r0)
|
|
3798
3798
|
default: oops()
|
|
3799
3799
|
} } }
|
|
3800
|
-
control_EventHandler_register_inline__P117802.info = {"start":
|
|
3800
|
+
control_EventHandler_register_inline__P117802.info = {"start":1079,"length":71,"line":32,"column":58,"endLine":34,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]}
|
|
3801
3801
|
|
|
3802
3802
|
function control_EventHandler_register_inline__P117802_mk(s) {
|
|
3803
3803
|
checkStack(s.depth);
|
|
@@ -3862,7 +3862,7 @@ switch (step) {
|
|
|
3862
3862
|
return leave(s, r0)
|
|
3863
3863
|
default: oops()
|
|
3864
3864
|
} } }
|
|
3865
|
-
control_EventContext_unregister__P114914.info = {"start":
|
|
3865
|
+
control_EventContext_unregister__P114914.info = {"start":4768,"length":131,"line":142,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]}
|
|
3866
3866
|
|
|
3867
3867
|
function control_EventContext_unregister__P114914_mk(s) {
|
|
3868
3868
|
checkStack(s.depth);
|
|
@@ -3908,7 +3908,7 @@ switch (step) {
|
|
|
3908
3908
|
return leave(s, r0)
|
|
3909
3909
|
default: oops()
|
|
3910
3910
|
} } }
|
|
3911
|
-
control_EventHandler_unregister__P114906.info = {"start":
|
|
3911
|
+
control_EventHandler_unregister__P114906.info = {"start":1183,"length":106,"line":37,"column":8,"endLine":39,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]}
|
|
3912
3912
|
|
|
3913
3913
|
function control_EventHandler_unregister__P114906_mk(s) {
|
|
3914
3914
|
checkStack(s.depth);
|
|
@@ -3938,7 +3938,7 @@ switch (step) {
|
|
|
3938
3938
|
return leave(s, r0)
|
|
3939
3939
|
default: oops()
|
|
3940
3940
|
} } }
|
|
3941
|
-
control_doNothing__P114908.info = {"start":
|
|
3941
|
+
control_doNothing__P114908.info = {"start":1301,"length":24,"line":42,"column":4,"endLine":42,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]}
|
|
3942
3942
|
|
|
3943
3943
|
function control_doNothing__P114908_mk(s) {
|
|
3944
3944
|
checkStack(s.depth);
|
|
@@ -7606,7 +7606,7 @@ switch (step) {
|
|
|
7606
7606
|
return leave(s, r0)
|
|
7607
7607
|
default: oops()
|
|
7608
7608
|
} } }
|
|
7609
|
-
console_inspect__P114882.info = {"start":
|
|
7609
|
+
console_inspect__P114882.info = {"start":2345,"length":1190,"line":83,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]}
|
|
7610
7610
|
|
|
7611
7611
|
function console_inspect__P114882_mk(s) {
|
|
7612
7612
|
checkStack(s.depth);
|
|
@@ -7698,7 +7698,7 @@ switch (step) {
|
|
|
7698
7698
|
return leave(s, r0)
|
|
7699
7699
|
default: oops()
|
|
7700
7700
|
} } }
|
|
7701
|
-
console_inspect_inline__P118864.info = {"start":
|
|
7701
|
+
console_inspect_inline__P118864.info = {"start":3367,"length":61,"line":110,"column":20,"endLine":110,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]}
|
|
7702
7702
|
|
|
7703
7703
|
function console_inspect_inline__P118864_mk(s) {
|
|
7704
7704
|
checkStack(s.depth);
|
|
@@ -9638,7 +9638,7 @@ switch (step) {
|
|
|
9638
9638
|
return leave(s, r0)
|
|
9639
9639
|
default: oops()
|
|
9640
9640
|
} } }
|
|
9641
|
-
control_onEvent__P114902.info = {"start":
|
|
9641
|
+
control_onEvent__P114902.info = {"start":383,"length":325,"line":10,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"onEvent","argumentNames":["src","value","handler","flags"]}
|
|
9642
9642
|
|
|
9643
9643
|
function control_onEvent__P114902_mk(s) {
|
|
9644
9644
|
checkStack(s.depth);
|
|
@@ -9745,7 +9745,7 @@ switch (step) {
|
|
|
9745
9745
|
return leave(s, r0)
|
|
9746
9746
|
default: oops()
|
|
9747
9747
|
} } }
|
|
9748
|
-
control_EventContext_registerHandler__P114917.info = {"start":
|
|
9748
|
+
control_EventContext_registerHandler__P114917.info = {"start":5807,"length":525,"line":174,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerHandler","argumentNames":["this","src","value","handler","flags"]}
|
|
9749
9749
|
|
|
9750
9750
|
function control_EventContext_registerHandler__P114917_mk(s) {
|
|
9751
9751
|
checkStack(s.depth);
|
|
@@ -9800,7 +9800,7 @@ switch (step) {
|
|
|
9800
9800
|
return leave(s, r0)
|
|
9801
9801
|
default: oops()
|
|
9802
9802
|
} } }
|
|
9803
|
-
control_EventHandler_constructor__P114907.info = {"start":
|
|
9803
|
+
control_EventHandler_constructor__P114907.info = {"start":833,"length":165,"line":24,"column":8,"endLine":29,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this","src","value","handler","flags"]}
|
|
9804
9804
|
|
|
9805
9805
|
function control_EventHandler_constructor__P114907_mk(s) {
|
|
9806
9806
|
checkStack(s.depth);
|
|
@@ -9845,7 +9845,7 @@ switch (step) {
|
|
|
9845
9845
|
return leave(s, r0)
|
|
9846
9846
|
default: oops()
|
|
9847
9847
|
} } }
|
|
9848
|
-
control_eventContext__P114925.info = {"start":
|
|
9848
|
+
control_eventContext__P114925.info = {"start":7141,"length":136,"line":214,"column":4,"endLine":216,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]}
|
|
9849
9849
|
|
|
9850
9850
|
function control_eventContext__P114925_mk(s) {
|
|
9851
9851
|
checkStack(s.depth);
|
|
@@ -16538,7 +16538,7 @@ switch (step) {
|
|
|
16538
16538
|
return leave(s, r0)
|
|
16539
16539
|
default: oops()
|
|
16540
16540
|
} } }
|
|
16541
|
-
console_log__P114880.info = {"start":
|
|
16541
|
+
console_log__P114880.info = {"start":1478,"length":86,"line":59,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]}
|
|
16542
16542
|
|
|
16543
16543
|
function console_log__P114880_mk(s) {
|
|
16544
16544
|
checkStack(s.depth);
|
|
@@ -21676,7 +21676,7 @@ switch (step) {
|
|
|
21676
21676
|
return leaveAccessor(s, r0)
|
|
21677
21677
|
default: oops()
|
|
21678
21678
|
} } }
|
|
21679
|
-
control_EventContext_deltaTime__P114910.info = {"start":
|
|
21679
|
+
control_EventContext_deltaTime__P114910.info = {"start":2182,"length":75,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"deltaTime","argumentNames":["this"]}
|
|
21680
21680
|
control_EventContext_deltaTime__P114910.isGetter = true;
|
|
21681
21681
|
|
|
21682
21682
|
function control_EventContext_deltaTime__P114910_mk(s) {
|
|
@@ -22133,7 +22133,7 @@ switch (step) {
|
|
|
22133
22133
|
return leave(s, r0)
|
|
22134
22134
|
default: oops()
|
|
22135
22135
|
} } }
|
|
22136
|
-
control_EventContext_registerFrameHandler__P114915.info = {"start":
|
|
22136
|
+
control_EventContext_registerFrameHandler__P114915.info = {"start":4909,"length":643,"line":148,"column":8,"endLine":165,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameHandler","argumentNames":["this","order","handler"]}
|
|
22137
22137
|
|
|
22138
22138
|
function control_EventContext_registerFrameHandler__P114915_mk(s) {
|
|
22139
22139
|
checkStack(s.depth);
|
|
@@ -22240,7 +22240,7 @@ switch (step) {
|
|
|
22240
22240
|
return leave(s, r0)
|
|
22241
22241
|
default: oops()
|
|
22242
22242
|
} } }
|
|
22243
|
-
control_pushEventContext__P114926.info = {"start":
|
|
22243
|
+
control_pushEventContext__P114926.info = {"start":7357,"length":340,"line":221,"column":4,"endLine":232,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]}
|
|
22244
22244
|
|
|
22245
22245
|
function control_pushEventContext__P114926_mk(s) {
|
|
22246
22246
|
checkStack(s.depth);
|
|
@@ -22295,7 +22295,7 @@ switch (step) {
|
|
|
22295
22295
|
return leave(s, r0)
|
|
22296
22296
|
default: oops()
|
|
22297
22297
|
} } }
|
|
22298
|
-
control_EventContext_constructor__P114923.info = {"start":
|
|
22298
|
+
control_EventContext_constructor__P114923.info = {"start":1825,"length":347,"line":60,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]}
|
|
22299
22299
|
|
|
22300
22300
|
function control_EventContext_constructor__P114923_mk(s) {
|
|
22301
22301
|
checkStack(s.depth);
|
|
@@ -27099,7 +27099,7 @@ switch (step) {
|
|
|
27099
27099
|
return leave(s, r0)
|
|
27100
27100
|
default: oops()
|
|
27101
27101
|
} } }
|
|
27102
|
-
console_addListener__P114883.info = {"start":
|
|
27102
|
+
console_addListener__P114883.info = {"start":3632,"length":197,"line":123,"column":4,"endLine":126,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]}
|
|
27103
27103
|
|
|
27104
27104
|
function console_addListener__P114883_mk(s) {
|
|
27105
27105
|
checkStack(s.depth);
|
|
@@ -35180,7 +35180,7 @@ switch (step) {
|
|
|
35180
35180
|
return leave(s, r0)
|
|
35181
35181
|
default: oops()
|
|
35182
35182
|
} } }
|
|
35183
|
-
control_ramSize__P114850.info = {"start":
|
|
35183
|
+
control_ramSize__P114850.info = {"start":4922,"length":100,"line":167,"column":4,"endLine":169,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]}
|
|
35184
35184
|
|
|
35185
35185
|
function control_ramSize__P114850_mk(s) {
|
|
35186
35186
|
checkStack(s.depth);
|
|
@@ -35208,7 +35208,7 @@ switch (step) {
|
|
|
35208
35208
|
return leave(s, r0)
|
|
35209
35209
|
default: oops()
|
|
35210
35210
|
} } }
|
|
35211
|
-
control__ramSize__P114849.info = {"start":
|
|
35211
|
+
control__ramSize__P114849.info = {"start":4802,"length":60,"line":162,"column":4,"endLine":164,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]}
|
|
35212
35212
|
|
|
35213
35213
|
function control__ramSize__P114849_mk(s) {
|
|
35214
35214
|
checkStack(s.depth);
|
|
@@ -37349,7 +37349,7 @@ switch (step) {
|
|
|
37349
37349
|
return leave(s, r0)
|
|
37350
37350
|
default: oops()
|
|
37351
37351
|
} } }
|
|
37352
|
-
pause__P114931.info = {"start":
|
|
37352
|
+
pause__P114931.info = {"start":267,"length":57,"line":8,"column":0,"endLine":10,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]}
|
|
37353
37353
|
|
|
37354
37354
|
function pause__P114931_mk(s) {
|
|
37355
37355
|
checkStack(s.depth);
|
|
@@ -48410,7 +48410,7 @@ switch (step) {
|
|
|
48410
48410
|
return leave(s, r0)
|
|
48411
48411
|
default: oops()
|
|
48412
48412
|
} } }
|
|
48413
|
-
control_allocateEventSource__P114840.info = {"start":
|
|
48413
|
+
control_allocateEventSource__P114840.info = {"start":2603,"length":72,"line":87,"column":4,"endLine":89,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"allocateEventSource","argumentNames":[]}
|
|
48414
48414
|
|
|
48415
48415
|
function control_allocateEventSource__P114840_mk(s) {
|
|
48416
48416
|
checkStack(s.depth);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// total=
|
|
1
|
+
// total=1687712 new=70.95% cached=0.00% other=29.05%
|
|
2
2
|
(function (ectx) {
|
|
3
3
|
'use strict';
|
|
4
4
|
const runtime = ectx.runtime;
|
|
@@ -2207,7 +2207,7 @@ switch (step) {
|
|
|
2207
2207
|
return leave(s, r0)
|
|
2208
2208
|
default: oops()
|
|
2209
2209
|
} } }
|
|
2210
|
-
console_addListener__P177327.info = {"start":
|
|
2210
|
+
console_addListener__P177327.info = {"start":3632,"length":197,"line":123,"column":4,"endLine":126,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]}
|
|
2211
2211
|
|
|
2212
2212
|
function console_addListener__P177327_mk(s) {
|
|
2213
2213
|
checkStack(s.depth);
|
|
@@ -4971,7 +4971,7 @@ switch (step) {
|
|
|
4971
4971
|
return leaveAccessor(s, r0)
|
|
4972
4972
|
default: oops()
|
|
4973
4973
|
} } }
|
|
4974
|
-
control_EventContext_deltaTime__P177354.info = {"start":
|
|
4974
|
+
control_EventContext_deltaTime__P177354.info = {"start":2182,"length":75,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"deltaTime","argumentNames":["this"]}
|
|
4975
4975
|
control_EventContext_deltaTime__P177354.isGetter = true;
|
|
4976
4976
|
|
|
4977
4977
|
function control_EventContext_deltaTime__P177354_mk(s) {
|
|
@@ -7014,7 +7014,7 @@ switch (step) {
|
|
|
7014
7014
|
return leave(s, r0)
|
|
7015
7015
|
default: oops()
|
|
7016
7016
|
} } }
|
|
7017
|
-
control_onEvent__P177346.info = {"start":
|
|
7017
|
+
control_onEvent__P177346.info = {"start":383,"length":325,"line":10,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"onEvent","argumentNames":["src","value","handler","flags"]}
|
|
7018
7018
|
|
|
7019
7019
|
function control_onEvent__P177346_mk(s) {
|
|
7020
7020
|
checkStack(s.depth);
|
|
@@ -7121,7 +7121,7 @@ switch (step) {
|
|
|
7121
7121
|
return leave(s, r0)
|
|
7122
7122
|
default: oops()
|
|
7123
7123
|
} } }
|
|
7124
|
-
control_EventContext_registerHandler__P177361.info = {"start":
|
|
7124
|
+
control_EventContext_registerHandler__P177361.info = {"start":5807,"length":525,"line":174,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerHandler","argumentNames":["this","src","value","handler","flags"]}
|
|
7125
7125
|
|
|
7126
7126
|
function control_EventContext_registerHandler__P177361_mk(s) {
|
|
7127
7127
|
checkStack(s.depth);
|
|
@@ -7178,7 +7178,7 @@ switch (step) {
|
|
|
7178
7178
|
return leave(s, r0)
|
|
7179
7179
|
default: oops()
|
|
7180
7180
|
} } }
|
|
7181
|
-
control_EventHandler_register__P177349.info = {"start":
|
|
7181
|
+
control_EventHandler_register__P177349.info = {"start":1008,"length":165,"line":31,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]}
|
|
7182
7182
|
|
|
7183
7183
|
function control_EventHandler_register__P177349_mk(s) {
|
|
7184
7184
|
checkStack(s.depth);
|
|
@@ -7228,7 +7228,7 @@ switch (step) {
|
|
|
7228
7228
|
return leave(s, r0)
|
|
7229
7229
|
default: oops()
|
|
7230
7230
|
} } }
|
|
7231
|
-
control_EventHandler_register_inline__P181253.info = {"start":
|
|
7231
|
+
control_EventHandler_register_inline__P181253.info = {"start":1079,"length":71,"line":32,"column":58,"endLine":34,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]}
|
|
7232
7232
|
|
|
7233
7233
|
function control_EventHandler_register_inline__P181253_mk(s) {
|
|
7234
7234
|
checkStack(s.depth);
|
|
@@ -7270,7 +7270,7 @@ switch (step) {
|
|
|
7270
7270
|
return leave(s, r0)
|
|
7271
7271
|
default: oops()
|
|
7272
7272
|
} } }
|
|
7273
|
-
control_EventHandler_constructor__P177351.info = {"start":
|
|
7273
|
+
control_EventHandler_constructor__P177351.info = {"start":833,"length":165,"line":24,"column":8,"endLine":29,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this","src","value","handler","flags"]}
|
|
7274
7274
|
|
|
7275
7275
|
function control_EventHandler_constructor__P177351_mk(s) {
|
|
7276
7276
|
checkStack(s.depth);
|
|
@@ -7315,7 +7315,7 @@ switch (step) {
|
|
|
7315
7315
|
return leave(s, r0)
|
|
7316
7316
|
default: oops()
|
|
7317
7317
|
} } }
|
|
7318
|
-
control_eventContext__P177369.info = {"start":
|
|
7318
|
+
control_eventContext__P177369.info = {"start":7141,"length":136,"line":214,"column":4,"endLine":216,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]}
|
|
7319
7319
|
|
|
7320
7320
|
function control_eventContext__P177369_mk(s) {
|
|
7321
7321
|
checkStack(s.depth);
|
|
@@ -11127,7 +11127,7 @@ switch (step) {
|
|
|
11127
11127
|
return leave(s, r0)
|
|
11128
11128
|
default: oops()
|
|
11129
11129
|
} } }
|
|
11130
|
-
control_EventContext_registerFrameHandler__P177359.info = {"start":
|
|
11130
|
+
control_EventContext_registerFrameHandler__P177359.info = {"start":4909,"length":643,"line":148,"column":8,"endLine":165,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameHandler","argumentNames":["this","order","handler"]}
|
|
11131
11131
|
|
|
11132
11132
|
function control_EventContext_registerFrameHandler__P177359_mk(s) {
|
|
11133
11133
|
checkStack(s.depth);
|
|
@@ -11192,7 +11192,7 @@ switch (step) {
|
|
|
11192
11192
|
return leave(s, r0)
|
|
11193
11193
|
default: oops()
|
|
11194
11194
|
} } }
|
|
11195
|
-
control_EventContext_registerFrameCallbacks__P177356.info = {"start":
|
|
11195
|
+
control_EventContext_registerFrameCallbacks__P177356.info = {"start":3715,"length":895,"line":110,"column":8,"endLine":134,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]}
|
|
11196
11196
|
|
|
11197
11197
|
function control_EventContext_registerFrameCallbacks__P177356_mk(s) {
|
|
11198
11198
|
checkStack(s.depth);
|
|
@@ -11268,7 +11268,7 @@ switch (step) {
|
|
|
11268
11268
|
return leave(s, r0)
|
|
11269
11269
|
default: oops()
|
|
11270
11270
|
} } }
|
|
11271
|
-
control_EventContext_registerFrameCallbacks_inline__P182416.info = {"start":
|
|
11271
|
+
control_EventContext_registerFrameCallbacks_inline__P182416.info = {"start":3876,"length":723,"line":114,"column":34,"endLine":133,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]}
|
|
11272
11272
|
|
|
11273
11273
|
function control_EventContext_registerFrameCallbacks_inline__P182416_mk(s) {
|
|
11274
11274
|
checkStack(s.depth);
|
|
@@ -11302,7 +11302,7 @@ switch (step) {
|
|
|
11302
11302
|
return leave(s, r0)
|
|
11303
11303
|
default: oops()
|
|
11304
11304
|
} } }
|
|
11305
|
-
control_EventContext_registerFrameCallbacks_inline__P182422.info = {"start":
|
|
11305
|
+
control_EventContext_registerFrameCallbacks_inline__P182422.info = {"start":4107,"length":28,"line":118,"column":31,"endLine":118,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]}
|
|
11306
11306
|
|
|
11307
11307
|
function control_EventContext_registerFrameCallbacks_inline__P182422_mk(s) {
|
|
11308
11308
|
checkStack(s.depth);
|
|
@@ -11569,7 +11569,7 @@ switch (step) {
|
|
|
11569
11569
|
return leave(s, r0)
|
|
11570
11570
|
default: oops()
|
|
11571
11571
|
} } }
|
|
11572
|
-
control_EventContext_runCallbacks__P177355.info = {"start":
|
|
11572
|
+
control_EventContext_runCallbacks__P177355.info = {"start":2267,"length":1395,"line":76,"column":8,"endLine":107,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]}
|
|
11573
11573
|
|
|
11574
11574
|
function control_EventContext_runCallbacks__P177355_mk(s) {
|
|
11575
11575
|
checkStack(s.depth);
|
|
@@ -12061,7 +12061,7 @@ switch (step) {
|
|
|
12061
12061
|
return leave(s, r0)
|
|
12062
12062
|
default: oops()
|
|
12063
12063
|
} } }
|
|
12064
|
-
control_pushEventContext__P177370.info = {"start":
|
|
12064
|
+
control_pushEventContext__P177370.info = {"start":7357,"length":340,"line":221,"column":4,"endLine":232,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]}
|
|
12065
12065
|
|
|
12066
12066
|
function control_pushEventContext__P177370_mk(s) {
|
|
12067
12067
|
checkStack(s.depth);
|
|
@@ -12116,7 +12116,7 @@ switch (step) {
|
|
|
12116
12116
|
return leave(s, r0)
|
|
12117
12117
|
default: oops()
|
|
12118
12118
|
} } }
|
|
12119
|
-
control_EventContext_constructor__P177367.info = {"start":
|
|
12119
|
+
control_EventContext_constructor__P177367.info = {"start":1825,"length":347,"line":60,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]}
|
|
12120
12120
|
|
|
12121
12121
|
function control_EventContext_constructor__P177367_mk(s) {
|
|
12122
12122
|
checkStack(s.depth);
|
|
@@ -12182,7 +12182,7 @@ switch (step) {
|
|
|
12182
12182
|
return leave(s, r0)
|
|
12183
12183
|
default: oops()
|
|
12184
12184
|
} } }
|
|
12185
|
-
control_EventContext_unregister__P177358.info = {"start":
|
|
12185
|
+
control_EventContext_unregister__P177358.info = {"start":4768,"length":131,"line":142,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]}
|
|
12186
12186
|
|
|
12187
12187
|
function control_EventContext_unregister__P177358_mk(s) {
|
|
12188
12188
|
checkStack(s.depth);
|
|
@@ -12228,7 +12228,7 @@ switch (step) {
|
|
|
12228
12228
|
return leave(s, r0)
|
|
12229
12229
|
default: oops()
|
|
12230
12230
|
} } }
|
|
12231
|
-
control_EventHandler_unregister__P177350.info = {"start":
|
|
12231
|
+
control_EventHandler_unregister__P177350.info = {"start":1183,"length":106,"line":37,"column":8,"endLine":39,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]}
|
|
12232
12232
|
|
|
12233
12233
|
function control_EventHandler_unregister__P177350_mk(s) {
|
|
12234
12234
|
checkStack(s.depth);
|
|
@@ -12258,7 +12258,7 @@ switch (step) {
|
|
|
12258
12258
|
return leave(s, r0)
|
|
12259
12259
|
default: oops()
|
|
12260
12260
|
} } }
|
|
12261
|
-
control_doNothing__P177352.info = {"start":
|
|
12261
|
+
control_doNothing__P177352.info = {"start":1301,"length":24,"line":42,"column":4,"endLine":42,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]}
|
|
12262
12262
|
|
|
12263
12263
|
function control_doNothing__P177352_mk(s) {
|
|
12264
12264
|
checkStack(s.depth);
|
|
@@ -14078,7 +14078,7 @@ switch (step) {
|
|
|
14078
14078
|
return leave(s, r0)
|
|
14079
14079
|
default: oops()
|
|
14080
14080
|
} } }
|
|
14081
|
-
control_popEventContext__P177371.info = {"start":
|
|
14081
|
+
control_popEventContext__P177371.info = {"start":7802,"length":413,"line":237,"column":4,"endLine":251,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]}
|
|
14082
14082
|
|
|
14083
14083
|
function control_popEventContext__P177371_mk(s) {
|
|
14084
14084
|
checkStack(s.depth);
|
|
@@ -14145,7 +14145,7 @@ switch (step) {
|
|
|
14145
14145
|
return leave(s, r0)
|
|
14146
14146
|
default: oops()
|
|
14147
14147
|
} } }
|
|
14148
|
-
control_EventContext_register__P177357.info = {"start":
|
|
14148
|
+
control_EventContext_register__P177357.info = {"start":4620,"length":138,"line":136,"column":8,"endLine":140,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]}
|
|
14149
14149
|
|
|
14150
14150
|
function control_EventContext_register__P177357_mk(s) {
|
|
14151
14151
|
checkStack(s.depth);
|
|
@@ -19796,7 +19796,7 @@ switch (step) {
|
|
|
19796
19796
|
return leave(s, r0)
|
|
19797
19797
|
default: oops()
|
|
19798
19798
|
} } }
|
|
19799
|
-
console_log__P177324.info = {"start":
|
|
19799
|
+
console_log__P177324.info = {"start":1478,"length":86,"line":59,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]}
|
|
19800
19800
|
|
|
19801
19801
|
function console_log__P177324_mk(s) {
|
|
19802
19802
|
checkStack(s.depth);
|
|
@@ -20111,7 +20111,7 @@ switch (step) {
|
|
|
20111
20111
|
return leave(s, r0)
|
|
20112
20112
|
default: oops()
|
|
20113
20113
|
} } }
|
|
20114
|
-
console_inspect__P177326.info = {"start":
|
|
20114
|
+
console_inspect__P177326.info = {"start":2345,"length":1190,"line":83,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]}
|
|
20115
20115
|
|
|
20116
20116
|
function console_inspect__P177326_mk(s) {
|
|
20117
20117
|
checkStack(s.depth);
|
|
@@ -20203,7 +20203,7 @@ switch (step) {
|
|
|
20203
20203
|
return leave(s, r0)
|
|
20204
20204
|
default: oops()
|
|
20205
20205
|
} } }
|
|
20206
|
-
console_inspect_inline__P184971.info = {"start":
|
|
20206
|
+
console_inspect_inline__P184971.info = {"start":3367,"length":61,"line":110,"column":20,"endLine":110,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]}
|
|
20207
20207
|
|
|
20208
20208
|
function console_inspect_inline__P184971_mk(s) {
|
|
20209
20209
|
checkStack(s.depth);
|
|
@@ -25316,7 +25316,7 @@ switch (step) {
|
|
|
25316
25316
|
return leave(s, r0)
|
|
25317
25317
|
default: oops()
|
|
25318
25318
|
} } }
|
|
25319
|
-
control_ramSize__P177294.info = {"start":
|
|
25319
|
+
control_ramSize__P177294.info = {"start":4922,"length":100,"line":167,"column":4,"endLine":169,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]}
|
|
25320
25320
|
|
|
25321
25321
|
function control_ramSize__P177294_mk(s) {
|
|
25322
25322
|
checkStack(s.depth);
|
|
@@ -25344,7 +25344,7 @@ switch (step) {
|
|
|
25344
25344
|
return leave(s, r0)
|
|
25345
25345
|
default: oops()
|
|
25346
25346
|
} } }
|
|
25347
|
-
control__ramSize__P177293.info = {"start":
|
|
25347
|
+
control__ramSize__P177293.info = {"start":4802,"length":60,"line":162,"column":4,"endLine":164,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]}
|
|
25348
25348
|
|
|
25349
25349
|
function control__ramSize__P177293_mk(s) {
|
|
25350
25350
|
checkStack(s.depth);
|
|
@@ -27610,7 +27610,7 @@ switch (step) {
|
|
|
27610
27610
|
return leave(s, r0)
|
|
27611
27611
|
default: oops()
|
|
27612
27612
|
} } }
|
|
27613
|
-
pause__P177375.info = {"start":
|
|
27613
|
+
pause__P177375.info = {"start":267,"length":57,"line":8,"column":0,"endLine":10,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]}
|
|
27614
27614
|
|
|
27615
27615
|
function pause__P177375_mk(s) {
|
|
27616
27616
|
checkStack(s.depth);
|
package/libs/radio/radio.cpp
CHANGED
|
@@ -151,6 +151,7 @@ CODAL_RADIO* getRadio() {
|
|
|
151
151
|
* Sends an event over radio to neigboring devices
|
|
152
152
|
*/
|
|
153
153
|
//% blockId=radioRaiseEvent block="radio raise event|from source %src=control_event_source_id|with value %value=control_event_value_id"
|
|
154
|
+
//% src.label="source" value.label="value"
|
|
154
155
|
//% blockExternalInputs=1
|
|
155
156
|
//% advanced=true
|
|
156
157
|
//% weight=1
|
|
@@ -236,6 +237,7 @@ CODAL_RADIO* getRadio() {
|
|
|
236
237
|
//% help=radio/set-group
|
|
237
238
|
//% weight=100
|
|
238
239
|
//% blockId=radio_set_group block="radio set group %ID"
|
|
240
|
+
//% id.label="value"
|
|
239
241
|
//% id.min=0 id.max=255
|
|
240
242
|
//% group="Group"
|
|
241
243
|
void setGroup(int id) {
|
|
@@ -253,6 +255,7 @@ CODAL_RADIO* getRadio() {
|
|
|
253
255
|
//% help=radio/set-transmit-power
|
|
254
256
|
//% weight=9 blockGap=8
|
|
255
257
|
//% blockId=radio_set_transmit_power block="radio set transmit power %power"
|
|
258
|
+
//% power.label="value"
|
|
256
259
|
//% power.min=0 power.max=7
|
|
257
260
|
//% advanced=true
|
|
258
261
|
void setTransmitPower(int power) {
|
|
@@ -270,6 +273,7 @@ CODAL_RADIO* getRadio() {
|
|
|
270
273
|
//% help=radio/set-frequency-band
|
|
271
274
|
//% weight=8 blockGap=8
|
|
272
275
|
//% blockId=radio_set_frequency_band block="radio set frequency band %band"
|
|
276
|
+
//% band.label="value"
|
|
273
277
|
//% band.min=0 band.max=83
|
|
274
278
|
//% advanced=true
|
|
275
279
|
void setFrequencyBand(int band) {
|