pxt-common-packages 10.1.3 → 10.1.6
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 +461 -461
- package/libs/color/built/debug/binary.js +8 -8
- package/libs/color-sensor/built/debug/binary.js +8 -8
- package/libs/controller/built/debug/binary.js +4323 -4278
- package/libs/controller---none/built/debug/binary.js +8093 -8048
- package/libs/core/hf2.cpp +90 -8
- package/libs/core/hf2.h +15 -0
- package/libs/core/pxt.h +5 -0
- package/libs/core---rp2040/platform.cpp +36 -8
- package/libs/datalogger/built/debug/binary.js +63 -63
- package/libs/edge-connector/built/debug/binary.js +8 -8
- package/libs/esp32/built/debug/binary.js +462 -462
- package/libs/game/built/debug/binary.js +7323 -7278
- package/libs/game/docs/reference/effects/clear-particles.md +37 -0
- package/libs/game/hitbox.ts +42 -1
- package/libs/game/sprite.ts +5 -38
- package/libs/game/temp.d.ts +6 -0
- package/libs/game/tsconfig.json +21 -0
- package/libs/lcd/built/debug/binary.js +8 -8
- package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
- package/libs/lora/built/debug/binary.js +8 -8
- package/libs/matrix-keypad/built/debug/binary.js +8 -8
- package/libs/mixer---rp2040/SoundOutput.h +1 -1
- package/libs/mqtt/built/debug/binary.js +176 -176
- package/libs/net/built/debug/binary.js +176 -176
- package/libs/net-game/built/debug/binary.js +9687 -9642
- package/libs/palette/built/debug/binary.js +7885 -7840
- package/libs/pixel/built/debug/binary.js +8 -8
- package/libs/power/built/debug/binary.js +8 -8
- package/libs/proximity/built/debug/binary.js +8 -8
- package/libs/radio/built/debug/binary.js +8 -8
- package/libs/radio-broadcast/built/debug/binary.js +8 -8
- package/libs/rotary-encoder/built/debug/binary.js +8 -8
- package/libs/screen/built/debug/binary.js +50 -50
- package/libs/servo/built/debug/binary.js +8 -8
- package/libs/settings/settings.cpp +1 -1
- package/libs/sprite-scaling/built/debug/binary.js +7885 -7840
- package/libs/storyboard/built/debug/binary.js +7885 -7840
- package/package.json +1 -1
package/libs/core/hf2.cpp
CHANGED
|
@@ -101,21 +101,54 @@ int HF2::stdRequest(UsbEndpointIn &ctrl, USBSetup &setup) {
|
|
|
101
101
|
return DEVICE_NOT_SUPPORTED;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
#define CTRL_GET_REPORT 0x01
|
|
106
|
-
#define CTRL_SET_REPORT 0x09
|
|
107
|
-
#define CTRL_OUT_REPORT_H 0x2
|
|
108
|
-
#define CTRL_IN_REPORT_H 0x1
|
|
104
|
+
#define HF2_FLAG_EVENT 0x01
|
|
109
105
|
|
|
106
|
+
REAL_TIME_FUNC
|
|
110
107
|
void HF2::sendBuffer(uint8_t flag, const void *data, unsigned size, uint32_t prepend) {
|
|
111
108
|
if (!CodalUSB::usbInstance->isInitialised())
|
|
112
109
|
return;
|
|
113
110
|
|
|
114
|
-
|
|
111
|
+
#ifdef USB_EP_FLAG_ASYNC
|
|
112
|
+
// drop non-responses if too much stuff queued up
|
|
113
|
+
if (flag != HF2_FLAG_CMDPKT_LAST && pendingWriteSize > 1000)
|
|
114
|
+
return;
|
|
115
|
+
#endif
|
|
116
|
+
|
|
117
|
+
if (flag == HF2_FLAG_EVENT)
|
|
118
|
+
flag = HF2_FLAG_CMDPKT_LAST;
|
|
115
119
|
|
|
116
120
|
if (prepend + 1)
|
|
117
121
|
size += 4;
|
|
118
122
|
|
|
123
|
+
#ifdef USB_EP_FLAG_ASYNC
|
|
124
|
+
HF2_PendingWrite *e = (HF2_PendingWrite *)malloc(sizeof(HF2_PendingWrite) + size);
|
|
125
|
+
e->size = size;
|
|
126
|
+
e->flag = flag;
|
|
127
|
+
e->next = NULL;
|
|
128
|
+
uint8_t *dst = e->data;
|
|
129
|
+
if (prepend + 1) {
|
|
130
|
+
memcpy(dst, &prepend, 4);
|
|
131
|
+
dst += 4;
|
|
132
|
+
size -= 4;
|
|
133
|
+
}
|
|
134
|
+
memcpy(dst, data, size);
|
|
135
|
+
|
|
136
|
+
target_disable_irq();
|
|
137
|
+
auto p = this->pendingWrite;
|
|
138
|
+
if (!p)
|
|
139
|
+
this->pendingWrite = e;
|
|
140
|
+
else {
|
|
141
|
+
while (p->next)
|
|
142
|
+
p = p->next;
|
|
143
|
+
p->next = e;
|
|
144
|
+
}
|
|
145
|
+
this->pendingWriteSize += 16 + e->size;
|
|
146
|
+
target_enable_irq();
|
|
147
|
+
|
|
148
|
+
pokeSend();
|
|
149
|
+
#else
|
|
150
|
+
uint32_t buf[64 / 4]; // aligned
|
|
151
|
+
|
|
119
152
|
target_disable_irq();
|
|
120
153
|
while (size > 0) {
|
|
121
154
|
memset(buf + 1, 0, 60);
|
|
@@ -143,6 +176,7 @@ void HF2::sendBuffer(uint8_t flag, const void *data, unsigned size, uint32_t pre
|
|
|
143
176
|
in->write(buf, sizeof(buf));
|
|
144
177
|
}
|
|
145
178
|
target_enable_irq();
|
|
179
|
+
#endif
|
|
146
180
|
}
|
|
147
181
|
|
|
148
182
|
const InterfaceInfo *HF2::getInterfaceInfo() {
|
|
@@ -154,7 +188,7 @@ const InterfaceInfo *HF2::getInterfaceInfo() {
|
|
|
154
188
|
}
|
|
155
189
|
|
|
156
190
|
int HF2::sendEvent(uint32_t evId, const void *data, int size) {
|
|
157
|
-
sendBuffer(
|
|
191
|
+
sendBuffer(HF2_FLAG_EVENT, data, size, evId);
|
|
158
192
|
return 0;
|
|
159
193
|
}
|
|
160
194
|
|
|
@@ -231,7 +265,7 @@ static void copy_words(void *dst0, const void *src0, uint32_t n_words) {
|
|
|
231
265
|
#define DBL_TAP_PTR ((volatile uint32_t *)(HSRAM_ADDR + HSRAM_SIZE - 4))
|
|
232
266
|
#endif
|
|
233
267
|
#if defined(NRF52840) || defined(NRF52833)
|
|
234
|
-
#define DBL_TAP_PTR ((volatile uint32_t*)0x20007F7C)
|
|
268
|
+
#define DBL_TAP_PTR ((volatile uint32_t *)0x20007F7C)
|
|
235
269
|
#endif
|
|
236
270
|
#define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
|
|
237
271
|
#define QUICK_BOOT(v) *DBL_TAP_PTR = v ? DBL_TAP_MAGIC_QUICK_BOOT : 0
|
|
@@ -242,7 +276,50 @@ static void jdLog(const uint8_t *frame) {
|
|
|
242
276
|
jdLogger->sendEvent(HF2_EV_JDS_PACKET, frame, frame[2] + 12);
|
|
243
277
|
}
|
|
244
278
|
|
|
279
|
+
void HF2::pokeSend() {
|
|
280
|
+
#ifdef USB_EP_FLAG_ASYNC
|
|
281
|
+
target_disable_irq();
|
|
282
|
+
if (pendingWrite && in->canWrite()) {
|
|
283
|
+
in->flags |= USB_EP_FLAG_ASYNC;
|
|
284
|
+
|
|
285
|
+
int size = pendingWrite->size - pendingWritePtr;
|
|
286
|
+
usb_assert(size > 0);
|
|
287
|
+
uint32_t buf[64 / 4] = {0};
|
|
288
|
+
|
|
289
|
+
int s = 63;
|
|
290
|
+
if (size <= 63) {
|
|
291
|
+
s = size;
|
|
292
|
+
buf[0] = pendingWrite->flag;
|
|
293
|
+
} else {
|
|
294
|
+
buf[0] = pendingWrite->flag == HF2_FLAG_CMDPKT_LAST ? HF2_FLAG_CMDPKT_BODY : pendingWrite->flag;
|
|
295
|
+
}
|
|
296
|
+
buf[0] |= s;
|
|
297
|
+
uint8_t *dst = (uint8_t *)buf;
|
|
298
|
+
dst++;
|
|
299
|
+
memcpy(dst, pendingWrite->data + pendingWritePtr, s);
|
|
300
|
+
|
|
301
|
+
int r = in->write(buf, sizeof(buf));
|
|
302
|
+
if (r == 0) {
|
|
303
|
+
if (s == size) {
|
|
304
|
+
pendingWritePtr = 0;
|
|
305
|
+
pendingWriteSize -= 16 + pendingWrite->size;
|
|
306
|
+
HF2_PendingWrite *n = pendingWrite->next;
|
|
307
|
+
free(pendingWrite);
|
|
308
|
+
pendingWrite = n;
|
|
309
|
+
} else {
|
|
310
|
+
pendingWritePtr += s;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
target_enable_irq();
|
|
315
|
+
#endif
|
|
316
|
+
}
|
|
317
|
+
|
|
245
318
|
int HF2::endpointRequest() {
|
|
319
|
+
#ifdef USB_EP_FLAG_ASYNC
|
|
320
|
+
pokeSend();
|
|
321
|
+
#endif
|
|
322
|
+
|
|
246
323
|
int sz = recv();
|
|
247
324
|
|
|
248
325
|
if (!sz)
|
|
@@ -369,6 +446,11 @@ int HF2::endpointRequest() {
|
|
|
369
446
|
|
|
370
447
|
HF2::HF2(HF2_Buffer &p) : gotSomePacket(false), ctrlWaiting(false), pkt(p), useHID(false) {
|
|
371
448
|
lastExchange = 0;
|
|
449
|
+
#ifdef USB_EP_FLAG_ASYNC
|
|
450
|
+
pendingWrite = NULL;
|
|
451
|
+
pendingWriteSize = 0;
|
|
452
|
+
pendingWritePtr = 0;
|
|
453
|
+
#endif
|
|
372
454
|
}
|
|
373
455
|
|
|
374
456
|
static const InterfaceInfo dummyIfaceInfo = {
|
package/libs/core/hf2.h
CHANGED
|
@@ -21,11 +21,25 @@ typedef struct {
|
|
|
21
21
|
};
|
|
22
22
|
} HF2_Buffer;
|
|
23
23
|
|
|
24
|
+
struct HF2_PendingWrite {
|
|
25
|
+
HF2_PendingWrite *next;
|
|
26
|
+
uint16_t size;
|
|
27
|
+
uint8_t flag;
|
|
28
|
+
uint8_t _reserved;
|
|
29
|
+
uint8_t data[0];
|
|
30
|
+
};
|
|
31
|
+
|
|
24
32
|
class HF2 : public CodalUSBInterface {
|
|
25
33
|
bool gotSomePacket;
|
|
26
34
|
bool ctrlWaiting;
|
|
27
35
|
uint32_t lastExchange;
|
|
28
36
|
|
|
37
|
+
#ifdef USB_EP_FLAG_ASYNC
|
|
38
|
+
HF2_PendingWrite *pendingWrite;
|
|
39
|
+
int pendingWriteSize;
|
|
40
|
+
int pendingWritePtr;
|
|
41
|
+
#endif
|
|
42
|
+
|
|
29
43
|
public:
|
|
30
44
|
HF2_Buffer &pkt;
|
|
31
45
|
|
|
@@ -36,6 +50,7 @@ class HF2 : public CodalUSBInterface {
|
|
|
36
50
|
int sendResponseWithData(const void *data, int size);
|
|
37
51
|
int sendEvent(uint32_t evId, const void *data, int size);
|
|
38
52
|
void sendBuffer(uint8_t flag, const void *data, unsigned size, uint32_t prepend = -1);
|
|
53
|
+
void pokeSend();
|
|
39
54
|
|
|
40
55
|
HF2(HF2_Buffer &pkt);
|
|
41
56
|
virtual int endpointRequest();
|
package/libs/core/pxt.h
CHANGED
|
@@ -4,26 +4,54 @@
|
|
|
4
4
|
|
|
5
5
|
#include "hardware/pll.h"
|
|
6
6
|
#include "hardware/clocks.h"
|
|
7
|
+
#include "hardware/structs/rosc.h"
|
|
7
8
|
|
|
8
9
|
namespace pxt {
|
|
9
10
|
|
|
10
11
|
LowLevelTimer *allocateTimer() {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
// TODO: add config to low level timer
|
|
13
|
+
return new RP2040LowLevelTimer();
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
static uint32_t hw_random(void) {
|
|
17
|
+
uint8_t buf[16];
|
|
18
|
+
for (unsigned i = 0; i < sizeof(buf); ++i) {
|
|
19
|
+
buf[i] = 0;
|
|
20
|
+
for (int j = 0; j < 8; ++j) {
|
|
21
|
+
buf[i] <<= 1;
|
|
22
|
+
if (rosc_hw->randombit)
|
|
23
|
+
buf[i] |= 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return hash_fnv1(buf, sizeof(buf));
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
void
|
|
21
|
-
|
|
29
|
+
static void initRandomSeed() {
|
|
30
|
+
seedRandom(hw_random());
|
|
22
31
|
}
|
|
23
32
|
|
|
33
|
+
void deepSleep() {}
|
|
34
|
+
|
|
24
35
|
void platform_init() {
|
|
25
|
-
|
|
36
|
+
initRandomSeed();
|
|
37
|
+
}
|
|
26
38
|
|
|
39
|
+
int *getBootloaderConfigData() {
|
|
40
|
+
static bool inited;
|
|
41
|
+
static int *cached;
|
|
42
|
+
|
|
43
|
+
if (!inited) {
|
|
44
|
+
inited = 1;
|
|
45
|
+
for (int i = 1; i <= 64; i *= 2) {
|
|
46
|
+
uint32_t *p = (uint32_t *)(XIP_BASE + i * 1024 * 1024 - 4096);
|
|
47
|
+
if (p[0] == CFG_MAGIC0 && p[1] == CFG_MAGIC1) {
|
|
48
|
+
cached = (int *)p;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return cached;
|
|
27
55
|
}
|
|
28
56
|
|
|
29
57
|
} // namespace pxt
|
|
@@ -58,7 +58,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
|
|
|
58
58
|
const pxsim_numops = pxsim.numops;
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
function
|
|
61
|
+
function _main___P57685(s) {
|
|
62
62
|
let r0 = s.r0, step = s.pc;
|
|
63
63
|
s.pc = -1;
|
|
64
64
|
|
|
@@ -68,20 +68,20 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
|
|
|
68
68
|
switch (step) {
|
|
69
69
|
case 0:
|
|
70
70
|
|
|
71
|
-
globals.
|
|
72
|
-
globals.
|
|
71
|
+
globals._intervals___57928 = (undefined);
|
|
72
|
+
globals._pollEventQueue___57941 = (undefined);
|
|
73
73
|
r0 = pxsim.storage.init();
|
|
74
|
-
globals.
|
|
75
|
-
globals.
|
|
76
|
-
r0 = pxsim_pxtcore_mkClassInstance(
|
|
74
|
+
globals._headers___58146 = (undefined);
|
|
75
|
+
globals._row___58150 = (undefined);
|
|
76
|
+
r0 = pxsim_pxtcore_mkClassInstance(datalogger_FileStorage__C58177_VT);
|
|
77
77
|
s.tmp_0 = r0;
|
|
78
|
-
s.tmp_1 =
|
|
78
|
+
s.tmp_1 = datalogger_FileStorage_constructor__P58183_mk(s);
|
|
79
79
|
s.tmp_1.arg0 = s.tmp_0;
|
|
80
80
|
s.tmp_1.arg1 = "log.csv";
|
|
81
81
|
s.callLocIdx = 3; s.pc = 1; return s.tmp_1;
|
|
82
82
|
case 1:
|
|
83
83
|
r0 = s.retval;
|
|
84
|
-
s.tmp_2 =
|
|
84
|
+
s.tmp_2 = datalogger_setStorage__P58170_mk(s);
|
|
85
85
|
s.tmp_2.arg0 = s.tmp_0;
|
|
86
86
|
s.callLocIdx = 4; s.pc = 2; return s.tmp_2;
|
|
87
87
|
case 2:
|
|
@@ -90,13 +90,13 @@ switch (step) {
|
|
|
90
90
|
return leave(s, r0)
|
|
91
91
|
default: oops()
|
|
92
92
|
} } }
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
_main___P57685.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
|
|
94
|
+
_main___P57685.continuations = [ ]
|
|
95
95
|
|
|
96
|
-
function
|
|
96
|
+
function _main___P57685_mk(s) {
|
|
97
97
|
checkStack(s.depth);
|
|
98
98
|
return {
|
|
99
|
-
parent: s, fn:
|
|
99
|
+
parent: s, fn: _main___P57685, depth: s.depth + 1,
|
|
100
100
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
101
101
|
tmp_0: undefined,
|
|
102
102
|
tmp_1: undefined,
|
|
@@ -107,7 +107,7 @@ function _main___P57686_mk(s) {
|
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
function
|
|
110
|
+
function datalogger_FileStorage_constructor__P58183(s) {
|
|
111
111
|
let r0 = s.r0, step = s.pc;
|
|
112
112
|
s.pc = -1;
|
|
113
113
|
|
|
@@ -123,19 +123,19 @@ switch (step) {
|
|
|
123
123
|
s.lambdaArgs = null;
|
|
124
124
|
}
|
|
125
125
|
r0 = s.arg0;
|
|
126
|
-
if (!checkSubtype(r0,
|
|
126
|
+
if (!checkSubtype(r0, datalogger_FileStorage__C58177_VT)) failedCast(r0);
|
|
127
127
|
r0 = undefined;
|
|
128
128
|
r0 = (s.arg0).fields["filename"] = (s.arg1);
|
|
129
129
|
r0 = undefined;
|
|
130
130
|
return leave(s, r0)
|
|
131
131
|
default: oops()
|
|
132
132
|
} } }
|
|
133
|
-
|
|
133
|
+
datalogger_FileStorage_constructor__P58183.info = {"start":192,"length":99,"line":7,"column":8,"endLine":10,"endColumn":9,"fileName":"storagedatalogger.ts","functionName":"inline","argumentNames":["this","filename"]}
|
|
134
134
|
|
|
135
|
-
function
|
|
135
|
+
function datalogger_FileStorage_constructor__P58183_mk(s) {
|
|
136
136
|
checkStack(s.depth);
|
|
137
137
|
return {
|
|
138
|
-
parent: s, fn:
|
|
138
|
+
parent: s, fn: datalogger_FileStorage_constructor__P58183, depth: s.depth + 1,
|
|
139
139
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
140
140
|
arg0: undefined,
|
|
141
141
|
arg1: undefined,
|
|
@@ -145,7 +145,7 @@ function datalogger_FileStorage_constructor__P58184_mk(s) {
|
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
|
|
148
|
-
function
|
|
148
|
+
function datalogger_Storage_constructor__P58144(s) {
|
|
149
149
|
let r0 = s.r0, step = s.pc;
|
|
150
150
|
s.pc = -1;
|
|
151
151
|
|
|
@@ -160,17 +160,17 @@ switch (step) {
|
|
|
160
160
|
s.lambdaArgs = null;
|
|
161
161
|
}
|
|
162
162
|
r0 = s.arg0;
|
|
163
|
-
if (!checkSubtype(r0,
|
|
163
|
+
if (!checkSubtype(r0, datalogger_Storage__C58139_VT)) failedCast(r0);
|
|
164
164
|
r0 = undefined;
|
|
165
165
|
return leave(s, r0)
|
|
166
166
|
default: oops()
|
|
167
167
|
} } }
|
|
168
|
-
|
|
168
|
+
datalogger_Storage_constructor__P58144.info = {"start":412,"length":25,"line":20,"column":8,"endLine":21,"endColumn":9,"fileName":"datalogger.ts","functionName":"inline","argumentNames":["this"]}
|
|
169
169
|
|
|
170
|
-
function
|
|
170
|
+
function datalogger_Storage_constructor__P58144_mk(s) {
|
|
171
171
|
checkStack(s.depth);
|
|
172
172
|
return {
|
|
173
|
-
parent: s, fn:
|
|
173
|
+
parent: s, fn: datalogger_Storage_constructor__P58144, depth: s.depth + 1,
|
|
174
174
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
175
175
|
arg0: undefined,
|
|
176
176
|
} }
|
|
@@ -179,7 +179,7 @@ function datalogger_Storage_constructor__P58145_mk(s) {
|
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
function
|
|
182
|
+
function datalogger_setStorage__P58170(s) {
|
|
183
183
|
let r0 = s.r0, step = s.pc;
|
|
184
184
|
s.pc = -1;
|
|
185
185
|
|
|
@@ -193,12 +193,12 @@ switch (step) {
|
|
|
193
193
|
s.arg0 = (s.lambdaArgs[0]);
|
|
194
194
|
s.lambdaArgs = null;
|
|
195
195
|
}
|
|
196
|
-
s.tmp_0 =
|
|
196
|
+
s.tmp_0 = datalogger_flush__P58171_mk(s);
|
|
197
197
|
s.callLocIdx = 0; s.pc = 1; return s.tmp_0;
|
|
198
198
|
case 1:
|
|
199
199
|
r0 = s.retval;
|
|
200
|
-
globals.
|
|
201
|
-
s.tmp_0 =
|
|
200
|
+
globals._storage___58152 = (s.arg0);
|
|
201
|
+
s.tmp_0 = datalogger_clear__P58165_mk(s);
|
|
202
202
|
s.callLocIdx = 1; s.pc = 2; return s.tmp_0;
|
|
203
203
|
case 2:
|
|
204
204
|
r0 = s.retval;
|
|
@@ -206,12 +206,12 @@ switch (step) {
|
|
|
206
206
|
return leave(s, r0)
|
|
207
207
|
default: oops()
|
|
208
208
|
} } }
|
|
209
|
-
|
|
209
|
+
datalogger_setStorage__P58170.info = {"start":4000,"length":114,"line":151,"column":4,"endLine":155,"endColumn":5,"fileName":"datalogger.ts","functionName":"setStorage","argumentNames":["storage"]}
|
|
210
210
|
|
|
211
|
-
function
|
|
211
|
+
function datalogger_setStorage__P58170_mk(s) {
|
|
212
212
|
checkStack(s.depth);
|
|
213
213
|
return {
|
|
214
|
-
parent: s, fn:
|
|
214
|
+
parent: s, fn: datalogger_setStorage__P58170, depth: s.depth + 1,
|
|
215
215
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
216
216
|
tmp_0: undefined,
|
|
217
217
|
arg0: undefined,
|
|
@@ -221,7 +221,7 @@ function datalogger_setStorage__P58171_mk(s) {
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
|
|
224
|
-
function
|
|
224
|
+
function datalogger_clear__P58165(s) {
|
|
225
225
|
let r0 = s.r0, step = s.pc;
|
|
226
226
|
s.pc = -1;
|
|
227
227
|
|
|
@@ -231,18 +231,18 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
|
|
|
231
231
|
switch (step) {
|
|
232
232
|
case 0:
|
|
233
233
|
|
|
234
|
-
globals.
|
|
235
|
-
globals.
|
|
234
|
+
globals._headers___58146 = (undefined);
|
|
235
|
+
globals._row___58150 = (undefined);
|
|
236
236
|
r0 = undefined;
|
|
237
237
|
return leave(s, r0)
|
|
238
238
|
default: oops()
|
|
239
239
|
} } }
|
|
240
|
-
|
|
240
|
+
datalogger_clear__P58165.info = {"start":1145,"length":80,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"datalogger.ts","functionName":"clear","argumentNames":[]}
|
|
241
241
|
|
|
242
|
-
function
|
|
242
|
+
function datalogger_clear__P58165_mk(s) {
|
|
243
243
|
checkStack(s.depth);
|
|
244
244
|
return {
|
|
245
|
-
parent: s, fn:
|
|
245
|
+
parent: s, fn: datalogger_clear__P58165, depth: s.depth + 1,
|
|
246
246
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
247
247
|
} }
|
|
248
248
|
|
|
@@ -250,7 +250,7 @@ function datalogger_clear__P58166_mk(s) {
|
|
|
250
250
|
|
|
251
251
|
|
|
252
252
|
|
|
253
|
-
function
|
|
253
|
+
function datalogger_flush__P58171(s) {
|
|
254
254
|
let r0 = s.r0, step = s.pc;
|
|
255
255
|
s.pc = -1;
|
|
256
256
|
|
|
@@ -260,21 +260,21 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
|
|
|
260
260
|
switch (step) {
|
|
261
261
|
case 0:
|
|
262
262
|
|
|
263
|
-
s.tmp_0 = r0 = globals.
|
|
263
|
+
s.tmp_0 = r0 = globals._headers___58146;
|
|
264
264
|
r0 = pxsim_numops_toBool(s.tmp_0);
|
|
265
265
|
if (r0) { step = 1; continue; }
|
|
266
266
|
r0 = s.tmp_0;
|
|
267
267
|
{ step = 2; continue; }
|
|
268
268
|
case 1:
|
|
269
|
-
r0 = globals.
|
|
269
|
+
r0 = globals._storage___58152;
|
|
270
270
|
case 2:
|
|
271
271
|
// jmp value (already in r0)
|
|
272
272
|
s.tmp_1 = r0;
|
|
273
273
|
r0 = pxsim_numops_toBoolDecr(s.tmp_1);
|
|
274
274
|
if (!r0) { step = 3; continue; }
|
|
275
|
-
s.tmp_2 =
|
|
276
|
-
s.tmp_2.arg0 = globals.
|
|
277
|
-
if (!checkSubtype(s.tmp_2.arg0,
|
|
275
|
+
s.tmp_2 = datalogger_Storage__C58139_v0_1_mk(s);
|
|
276
|
+
s.tmp_2.arg0 = globals._storage___58152;
|
|
277
|
+
if (!checkSubtype(s.tmp_2.arg0, datalogger_Storage__C58139_VT)) failedCast(s.tmp_2.arg0);
|
|
278
278
|
s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.flush;
|
|
279
279
|
s.pc = 5; return s.tmp_2;
|
|
280
280
|
case 5:
|
|
@@ -285,12 +285,12 @@ switch (step) {
|
|
|
285
285
|
return leave(s, r0)
|
|
286
286
|
default: oops()
|
|
287
287
|
} } }
|
|
288
|
-
|
|
288
|
+
datalogger_flush__P58171.info = {"start":4184,"length":95,"line":161,"column":4,"endLine":164,"endColumn":5,"fileName":"datalogger.ts","functionName":"flush","argumentNames":[]}
|
|
289
289
|
|
|
290
|
-
function
|
|
290
|
+
function datalogger_flush__P58171_mk(s) {
|
|
291
291
|
checkStack(s.depth);
|
|
292
292
|
return {
|
|
293
|
-
parent: s, fn:
|
|
293
|
+
parent: s, fn: datalogger_flush__P58171, depth: s.depth + 1,
|
|
294
294
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
295
295
|
tmp_0: undefined,
|
|
296
296
|
tmp_1: undefined,
|
|
@@ -301,7 +301,7 @@ function datalogger_flush__P58172_mk(s) {
|
|
|
301
301
|
|
|
302
302
|
|
|
303
303
|
|
|
304
|
-
function
|
|
304
|
+
function datalogger_Storage_flush__P58143(s) {
|
|
305
305
|
let r0 = s.r0, step = s.pc;
|
|
306
306
|
s.pc = -1;
|
|
307
307
|
|
|
@@ -316,17 +316,17 @@ switch (step) {
|
|
|
316
316
|
s.lambdaArgs = null;
|
|
317
317
|
}
|
|
318
318
|
r0 = s.arg0;
|
|
319
|
-
if (!checkSubtype(r0,
|
|
319
|
+
if (!checkSubtype(r0, datalogger_Storage__C58139_VT)) failedCast(r0);
|
|
320
320
|
r0 = undefined;
|
|
321
321
|
return leave(s, r0)
|
|
322
322
|
default: oops()
|
|
323
323
|
} } }
|
|
324
|
-
|
|
324
|
+
datalogger_Storage_flush__P58143.info = {"start":807,"length":17,"line":37,"column":8,"endLine":37,"endColumn":25,"fileName":"datalogger.ts","functionName":"flush","argumentNames":["this"]}
|
|
325
325
|
|
|
326
|
-
function
|
|
326
|
+
function datalogger_Storage_flush__P58143_mk(s) {
|
|
327
327
|
checkStack(s.depth);
|
|
328
328
|
return {
|
|
329
|
-
parent: s, fn:
|
|
329
|
+
parent: s, fn: datalogger_Storage_flush__P58143, depth: s.depth + 1,
|
|
330
330
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
331
331
|
arg0: undefined,
|
|
332
332
|
} }
|
|
@@ -335,7 +335,7 @@ function datalogger_Storage_flush__P58144_mk(s) {
|
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
|
|
338
|
-
function
|
|
338
|
+
function datalogger_FileStorage_flush__P58182(s) {
|
|
339
339
|
let r0 = s.r0, step = s.pc;
|
|
340
340
|
s.pc = -1;
|
|
341
341
|
|
|
@@ -350,17 +350,17 @@ switch (step) {
|
|
|
350
350
|
s.lambdaArgs = null;
|
|
351
351
|
}
|
|
352
352
|
r0 = s.arg0;
|
|
353
|
-
if (!checkSubtype(r0,
|
|
353
|
+
if (!checkSubtype(r0, datalogger_FileStorage__C58177_VT)) failedCast(r0);
|
|
354
354
|
r0 = undefined;
|
|
355
355
|
return leave(s, r0)
|
|
356
356
|
default: oops()
|
|
357
357
|
} } }
|
|
358
|
-
|
|
358
|
+
datalogger_FileStorage_flush__P58182.info = {"start":1121,"length":27,"line":38,"column":8,"endLine":40,"endColumn":9,"fileName":"storagedatalogger.ts","functionName":"flush","argumentNames":["this"]}
|
|
359
359
|
|
|
360
|
-
function
|
|
360
|
+
function datalogger_FileStorage_flush__P58182_mk(s) {
|
|
361
361
|
checkStack(s.depth);
|
|
362
362
|
return {
|
|
363
|
-
parent: s, fn:
|
|
363
|
+
parent: s, fn: datalogger_FileStorage_flush__P58182, depth: s.depth + 1,
|
|
364
364
|
pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
|
|
365
365
|
arg0: undefined,
|
|
366
366
|
} }
|
|
@@ -368,7 +368,7 @@ function datalogger_FileStorage_flush__P58183_mk(s) {
|
|
|
368
368
|
|
|
369
369
|
|
|
370
370
|
|
|
371
|
-
function
|
|
371
|
+
function datalogger_Storage__C58139_v0_1_mk(s) {
|
|
372
372
|
checkStack(s.depth);
|
|
373
373
|
return {
|
|
374
374
|
parent: s, fn: null, depth: s.depth + 1,
|
|
@@ -381,36 +381,36 @@ function datalogger_Storage__C58140_v0_1_mk(s) {
|
|
|
381
381
|
arg0: undefined,
|
|
382
382
|
} }
|
|
383
383
|
|
|
384
|
-
const
|
|
384
|
+
const datalogger_Storage__C58139_VT = mkVTable({
|
|
385
385
|
name: "Storage",
|
|
386
386
|
numFields: 0,
|
|
387
387
|
classNo: 16,
|
|
388
388
|
lastSubtypeNo: 17,
|
|
389
389
|
maxBgInstances: null,
|
|
390
390
|
methods: {
|
|
391
|
-
"flush":
|
|
391
|
+
"flush": datalogger_Storage_flush__P58143,
|
|
392
392
|
},
|
|
393
393
|
iface: {
|
|
394
|
-
"flush":
|
|
394
|
+
"flush": datalogger_Storage_flush__P58143,
|
|
395
395
|
},
|
|
396
396
|
});
|
|
397
|
-
const
|
|
397
|
+
const datalogger_FileStorage__C58177_VT = mkVTable({
|
|
398
398
|
name: "FileStorage",
|
|
399
399
|
numFields: 1,
|
|
400
400
|
classNo: 17,
|
|
401
401
|
lastSubtypeNo: 17,
|
|
402
402
|
maxBgInstances: null,
|
|
403
403
|
methods: {
|
|
404
|
-
"flush":
|
|
404
|
+
"flush": datalogger_FileStorage_flush__P58182,
|
|
405
405
|
},
|
|
406
406
|
iface: {
|
|
407
407
|
"filename": null,
|
|
408
408
|
"set/filename": null,
|
|
409
|
-
"flush":
|
|
409
|
+
"flush": datalogger_FileStorage_flush__P58182,
|
|
410
410
|
},
|
|
411
411
|
});
|
|
412
412
|
|
|
413
|
-
const breakpoints = setupDebugger(1, ["
|
|
413
|
+
const breakpoints = setupDebugger(1, ["_headers___58146","_row___58150","_storage___58152"])
|
|
414
414
|
|
|
415
|
-
return
|
|
415
|
+
return _main___P57685
|
|
416
416
|
})
|
|
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
|
|
|
56
56
|
const pxsim_numops = pxsim.numops;
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
function
|
|
59
|
+
function _main___P99030(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.
|
|
70
|
-
globals.
|
|
69
|
+
globals._intervals___99273 = (undefined);
|
|
70
|
+
globals._pollEventQueue___99286 = (undefined);
|
|
71
71
|
r0 = undefined;
|
|
72
72
|
return leave(s, r0)
|
|
73
73
|
default: oops()
|
|
74
74
|
} } }
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
_main___P99030.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/core/pinscompat.ts","functionName":"<main>","argumentNames":[]}
|
|
76
|
+
_main___P99030.continuations = [ ]
|
|
77
77
|
|
|
78
|
-
function
|
|
78
|
+
function _main___P99030_mk(s) {
|
|
79
79
|
checkStack(s.depth);
|
|
80
80
|
return {
|
|
81
|
-
parent: s, fn:
|
|
81
|
+
parent: s, fn: _main___P99030, 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___P99033_mk(s) {
|
|
|
88
88
|
|
|
89
89
|
const breakpoints = setupDebugger(1, [])
|
|
90
90
|
|
|
91
|
-
return
|
|
91
|
+
return _main___P99030
|
|
92
92
|
})
|