pxt-common-packages 10.1.5 → 10.1.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.
Files changed (41) hide show
  1. package/built/common-sim.js +1 -1
  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 +6906 -6906
  6. package/libs/controller---none/built/debug/binary.js +6886 -6886
  7. package/libs/core/hf2.cpp +100 -8
  8. package/libs/core/hf2.h +15 -0
  9. package/libs/core/pxt.h +5 -0
  10. package/libs/core---rp2040/platform.cpp +36 -8
  11. package/libs/core---rp2040/platform.h +0 -1
  12. package/libs/core---stm32/platform.h +0 -2
  13. package/libs/datalogger/built/debug/binary.js +63 -63
  14. package/libs/edge-connector/built/debug/binary.js +8 -8
  15. package/libs/esp32/built/debug/binary.js +462 -462
  16. package/libs/game/built/debug/binary.js +6825 -6825
  17. package/libs/lcd/built/debug/binary.js +8 -8
  18. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  19. package/libs/lora/built/debug/binary.js +8 -8
  20. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  21. package/libs/mixer/melody.ts +2 -2
  22. package/libs/mixer/pxt.json +1 -0
  23. package/libs/mixer/sim/music.ts +1 -1
  24. package/libs/mixer/soundEffect.ts +380 -0
  25. package/libs/mixer---rp2040/SoundOutput.h +1 -1
  26. package/libs/mqtt/built/debug/binary.js +176 -176
  27. package/libs/net/built/debug/binary.js +176 -176
  28. package/libs/net-game/built/debug/binary.js +8414 -8414
  29. package/libs/palette/built/debug/binary.js +6824 -6824
  30. package/libs/pixel/built/debug/binary.js +8 -8
  31. package/libs/power/built/debug/binary.js +8 -8
  32. package/libs/proximity/built/debug/binary.js +8 -8
  33. package/libs/radio/built/debug/binary.js +8 -8
  34. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  35. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  36. package/libs/screen/built/debug/binary.js +50 -50
  37. package/libs/servo/built/debug/binary.js +8 -8
  38. package/libs/settings/settings.cpp +1 -1
  39. package/libs/sprite-scaling/built/debug/binary.js +6824 -6824
  40. package/libs/storyboard/built/debug/binary.js +6824 -6824
  41. package/package.json +2 -2
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
- // same as in microbit
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
- uint32_t buf[64 / 4]; // aligned
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(HF2_FLAG_CMDPKT_LAST, data, size, evId);
191
+ sendBuffer(HF2_FLAG_EVENT, data, size, evId);
158
192
  return 0;
159
193
  }
160
194
 
@@ -231,18 +265,64 @@ 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
270
+ #ifdef DBL_TAP_PTR
236
271
  #define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
237
272
  #define QUICK_BOOT(v) *DBL_TAP_PTR = v ? DBL_TAP_MAGIC_QUICK_BOOT : 0
238
273
  #endif
274
+ #endif
239
275
 
240
276
  static HF2 *jdLogger;
241
277
  static void jdLog(const uint8_t *frame) {
242
278
  jdLogger->sendEvent(HF2_EV_JDS_PACKET, frame, frame[2] + 12);
243
279
  }
244
280
 
281
+ void HF2::pokeSend() {
282
+ #ifdef USB_EP_FLAG_ASYNC
283
+ target_disable_irq();
284
+ while (pendingWrite && in->canWrite()) {
285
+ in->flags |= USB_EP_FLAG_ASYNC;
286
+
287
+ int size = pendingWrite->size - pendingWritePtr;
288
+ usb_assert(size > 0);
289
+ uint32_t buf[64 / 4] = {0};
290
+
291
+ int s = 63;
292
+ if (size <= 63) {
293
+ s = size;
294
+ buf[0] = pendingWrite->flag;
295
+ } else {
296
+ buf[0] = pendingWrite->flag == HF2_FLAG_CMDPKT_LAST ? HF2_FLAG_CMDPKT_BODY
297
+ : pendingWrite->flag;
298
+ }
299
+ buf[0] |= s;
300
+ uint8_t *dst = (uint8_t *)buf;
301
+ dst++;
302
+ memcpy(dst, pendingWrite->data + pendingWritePtr, s);
303
+
304
+ int r = in->write(buf, sizeof(buf));
305
+ if (r == 0) {
306
+ if (s == size) {
307
+ pendingWritePtr = 0;
308
+ pendingWriteSize -= 16 + pendingWrite->size;
309
+ HF2_PendingWrite *n = pendingWrite->next;
310
+ free(pendingWrite);
311
+ pendingWrite = n;
312
+ } else {
313
+ pendingWritePtr += s;
314
+ }
315
+ }
316
+ }
317
+ target_enable_irq();
318
+ #endif
319
+ }
320
+
245
321
  int HF2::endpointRequest() {
322
+ #ifdef USB_EP_FLAG_ASYNC
323
+ pokeSend();
324
+ #endif
325
+
246
326
  int sz = recv();
247
327
 
248
328
  if (!sz)
@@ -287,6 +367,7 @@ int HF2::endpointRequest() {
287
367
  target_reset();
288
368
  break;
289
369
 
370
+ #ifdef QUICK_BOOT
290
371
  case HF2_CMD_RESET_INTO_APP:
291
372
  QUICK_BOOT(1);
292
373
  NVIC_SystemReset();
@@ -295,6 +376,12 @@ int HF2::endpointRequest() {
295
376
  QUICK_BOOT(0);
296
377
  NVIC_SystemReset();
297
378
  break;
379
+ #else
380
+ case HF2_CMD_RESET_INTO_APP:
381
+ NVIC_SystemReset();
382
+ break;
383
+ // reset into bootloader not supported
384
+ #endif
298
385
 
299
386
  #if USB_HANDOVER
300
387
  case HF2_CMD_START_FLASH:
@@ -369,6 +456,11 @@ int HF2::endpointRequest() {
369
456
 
370
457
  HF2::HF2(HF2_Buffer &p) : gotSomePacket(false), ctrlWaiting(false), pkt(p), useHID(false) {
371
458
  lastExchange = 0;
459
+ #ifdef USB_EP_FLAG_ASYNC
460
+ pendingWrite = NULL;
461
+ pendingWriteSize = 0;
462
+ pendingWritePtr = 0;
463
+ #endif
372
464
  }
373
465
 
374
466
  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
@@ -44,6 +44,11 @@ using namespace codal;
44
44
 
45
45
  #define PXT_COMM_BASE 0x20002000 // 8k in
46
46
 
47
+ // old codal compat
48
+ #ifndef REAL_TIME_FUNC
49
+ #define REAL_TIME_FUNC /* */
50
+ #endif
51
+
47
52
  namespace pxt {
48
53
 
49
54
  #if CONFIG_ENABLED(DEVICE_USB)
@@ -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
- // TODO: add config to low level timer
12
- return new RP2040LowLevelTimer();
12
+ // TODO: add config to low level timer
13
+ return new RP2040LowLevelTimer();
13
14
  }
14
15
 
15
- static void initRandomSeed() {
16
- uint32_t f_rosc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC);
17
- seedRandom(f_rosc);
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 deepSleep() {
21
-
29
+ static void initRandomSeed() {
30
+ seedRandom(hw_random());
22
31
  }
23
32
 
33
+ void deepSleep() {}
34
+
24
35
  void platform_init() {
25
- initRandomSeed();
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
@@ -28,7 +28,6 @@
28
28
  #define CODAL_I2C RP2040I2C
29
29
  #define CODAL_TIMER Timer
30
30
 
31
- #define QUICK_BOOT(v) ((void)0) // not supported
32
31
  #define UF2_INFO_TXT "UF2 Bootloader v1.0\nModel: Raspberry Pi RP2\nBoard-ID: RPI-RP2"
33
32
 
34
33
  typedef uint8_t PinName;
@@ -40,8 +40,6 @@ struct F4_Settings {
40
40
  do { \
41
41
  RTC->BKP0R = v ? APP_RTC_SIGNATURE : HF2_RTC_SIGNATURE; \
42
42
  } while (0)
43
- #else
44
- #define QUICK_BOOT(v) ((void)0)
45
43
  #endif
46
44
 
47
45
  #define PAGE_SIZE 1024 // not really
@@ -58,7 +58,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
58
58
  const pxsim_numops = pxsim.numops;
59
59
 
60
60
 
61
- function _main___P57685(s) {
61
+ function _main___P57725(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._intervals___57928 = (undefined);
72
- globals._pollEventQueue___57941 = (undefined);
71
+ globals._intervals___57968 = (undefined);
72
+ globals._pollEventQueue___57981 = (undefined);
73
73
  r0 = pxsim.storage.init();
74
- globals._headers___58146 = (undefined);
75
- globals._row___58150 = (undefined);
76
- r0 = pxsim_pxtcore_mkClassInstance(datalogger_FileStorage__C58177_VT);
74
+ globals._headers___58186 = (undefined);
75
+ globals._row___58190 = (undefined);
76
+ r0 = pxsim_pxtcore_mkClassInstance(datalogger_FileStorage__C58217_VT);
77
77
  s.tmp_0 = r0;
78
- s.tmp_1 = datalogger_FileStorage_constructor__P58183_mk(s);
78
+ s.tmp_1 = datalogger_FileStorage_constructor__P58223_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 = datalogger_setStorage__P58170_mk(s);
84
+ s.tmp_2 = datalogger_setStorage__P58210_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
- _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 = [ ]
93
+ _main___P57725.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
94
+ _main___P57725.continuations = [ ]
95
95
 
96
- function _main___P57685_mk(s) {
96
+ function _main___P57725_mk(s) {
97
97
  checkStack(s.depth);
98
98
  return {
99
- parent: s, fn: _main___P57685, depth: s.depth + 1,
99
+ parent: s, fn: _main___P57725, 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___P57685_mk(s) {
107
107
 
108
108
 
109
109
 
110
- function datalogger_FileStorage_constructor__P58183(s) {
110
+ function datalogger_FileStorage_constructor__P58223(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, datalogger_FileStorage__C58177_VT)) failedCast(r0);
126
+ if (!checkSubtype(r0, datalogger_FileStorage__C58217_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
- 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"]}
133
+ datalogger_FileStorage_constructor__P58223.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 datalogger_FileStorage_constructor__P58183_mk(s) {
135
+ function datalogger_FileStorage_constructor__P58223_mk(s) {
136
136
  checkStack(s.depth);
137
137
  return {
138
- parent: s, fn: datalogger_FileStorage_constructor__P58183, depth: s.depth + 1,
138
+ parent: s, fn: datalogger_FileStorage_constructor__P58223, 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__P58183_mk(s) {
145
145
 
146
146
 
147
147
 
148
- function datalogger_Storage_constructor__P58144(s) {
148
+ function datalogger_Storage_constructor__P58184(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, datalogger_Storage__C58139_VT)) failedCast(r0);
163
+ if (!checkSubtype(r0, datalogger_Storage__C58179_VT)) failedCast(r0);
164
164
  r0 = undefined;
165
165
  return leave(s, r0)
166
166
  default: oops()
167
167
  } } }
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"]}
168
+ datalogger_Storage_constructor__P58184.info = {"start":412,"length":25,"line":20,"column":8,"endLine":21,"endColumn":9,"fileName":"datalogger.ts","functionName":"inline","argumentNames":["this"]}
169
169
 
170
- function datalogger_Storage_constructor__P58144_mk(s) {
170
+ function datalogger_Storage_constructor__P58184_mk(s) {
171
171
  checkStack(s.depth);
172
172
  return {
173
- parent: s, fn: datalogger_Storage_constructor__P58144, depth: s.depth + 1,
173
+ parent: s, fn: datalogger_Storage_constructor__P58184, 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__P58144_mk(s) {
179
179
 
180
180
 
181
181
 
182
- function datalogger_setStorage__P58170(s) {
182
+ function datalogger_setStorage__P58210(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 = datalogger_flush__P58171_mk(s);
196
+ s.tmp_0 = datalogger_flush__P58211_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._storage___58152 = (s.arg0);
201
- s.tmp_0 = datalogger_clear__P58165_mk(s);
200
+ globals._storage___58192 = (s.arg0);
201
+ s.tmp_0 = datalogger_clear__P58205_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
- datalogger_setStorage__P58170.info = {"start":4000,"length":114,"line":151,"column":4,"endLine":155,"endColumn":5,"fileName":"datalogger.ts","functionName":"setStorage","argumentNames":["storage"]}
209
+ datalogger_setStorage__P58210.info = {"start":4000,"length":114,"line":151,"column":4,"endLine":155,"endColumn":5,"fileName":"datalogger.ts","functionName":"setStorage","argumentNames":["storage"]}
210
210
 
211
- function datalogger_setStorage__P58170_mk(s) {
211
+ function datalogger_setStorage__P58210_mk(s) {
212
212
  checkStack(s.depth);
213
213
  return {
214
- parent: s, fn: datalogger_setStorage__P58170, depth: s.depth + 1,
214
+ parent: s, fn: datalogger_setStorage__P58210, 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__P58170_mk(s) {
221
221
 
222
222
 
223
223
 
224
- function datalogger_clear__P58165(s) {
224
+ function datalogger_clear__P58205(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._headers___58146 = (undefined);
235
- globals._row___58150 = (undefined);
234
+ globals._headers___58186 = (undefined);
235
+ globals._row___58190 = (undefined);
236
236
  r0 = undefined;
237
237
  return leave(s, r0)
238
238
  default: oops()
239
239
  } } }
240
- datalogger_clear__P58165.info = {"start":1145,"length":80,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"datalogger.ts","functionName":"clear","argumentNames":[]}
240
+ datalogger_clear__P58205.info = {"start":1145,"length":80,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"datalogger.ts","functionName":"clear","argumentNames":[]}
241
241
 
242
- function datalogger_clear__P58165_mk(s) {
242
+ function datalogger_clear__P58205_mk(s) {
243
243
  checkStack(s.depth);
244
244
  return {
245
- parent: s, fn: datalogger_clear__P58165, depth: s.depth + 1,
245
+ parent: s, fn: datalogger_clear__P58205, 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__P58165_mk(s) {
250
250
 
251
251
 
252
252
 
253
- function datalogger_flush__P58171(s) {
253
+ function datalogger_flush__P58211(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._headers___58146;
263
+ s.tmp_0 = r0 = globals._headers___58186;
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._storage___58152;
269
+ r0 = globals._storage___58192;
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 = 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);
275
+ s.tmp_2 = datalogger_Storage__C58179_v0_1_mk(s);
276
+ s.tmp_2.arg0 = globals._storage___58192;
277
+ if (!checkSubtype(s.tmp_2.arg0, datalogger_Storage__C58179_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
- datalogger_flush__P58171.info = {"start":4184,"length":95,"line":161,"column":4,"endLine":164,"endColumn":5,"fileName":"datalogger.ts","functionName":"flush","argumentNames":[]}
288
+ datalogger_flush__P58211.info = {"start":4184,"length":95,"line":161,"column":4,"endLine":164,"endColumn":5,"fileName":"datalogger.ts","functionName":"flush","argumentNames":[]}
289
289
 
290
- function datalogger_flush__P58171_mk(s) {
290
+ function datalogger_flush__P58211_mk(s) {
291
291
  checkStack(s.depth);
292
292
  return {
293
- parent: s, fn: datalogger_flush__P58171, depth: s.depth + 1,
293
+ parent: s, fn: datalogger_flush__P58211, 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__P58171_mk(s) {
301
301
 
302
302
 
303
303
 
304
- function datalogger_Storage_flush__P58143(s) {
304
+ function datalogger_Storage_flush__P58183(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, datalogger_Storage__C58139_VT)) failedCast(r0);
319
+ if (!checkSubtype(r0, datalogger_Storage__C58179_VT)) failedCast(r0);
320
320
  r0 = undefined;
321
321
  return leave(s, r0)
322
322
  default: oops()
323
323
  } } }
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"]}
324
+ datalogger_Storage_flush__P58183.info = {"start":807,"length":17,"line":37,"column":8,"endLine":37,"endColumn":25,"fileName":"datalogger.ts","functionName":"flush","argumentNames":["this"]}
325
325
 
326
- function datalogger_Storage_flush__P58143_mk(s) {
326
+ function datalogger_Storage_flush__P58183_mk(s) {
327
327
  checkStack(s.depth);
328
328
  return {
329
- parent: s, fn: datalogger_Storage_flush__P58143, depth: s.depth + 1,
329
+ parent: s, fn: datalogger_Storage_flush__P58183, 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__P58143_mk(s) {
335
335
 
336
336
 
337
337
 
338
- function datalogger_FileStorage_flush__P58182(s) {
338
+ function datalogger_FileStorage_flush__P58222(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, datalogger_FileStorage__C58177_VT)) failedCast(r0);
353
+ if (!checkSubtype(r0, datalogger_FileStorage__C58217_VT)) failedCast(r0);
354
354
  r0 = undefined;
355
355
  return leave(s, r0)
356
356
  default: oops()
357
357
  } } }
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"]}
358
+ datalogger_FileStorage_flush__P58222.info = {"start":1121,"length":27,"line":38,"column":8,"endLine":40,"endColumn":9,"fileName":"storagedatalogger.ts","functionName":"flush","argumentNames":["this"]}
359
359
 
360
- function datalogger_FileStorage_flush__P58182_mk(s) {
360
+ function datalogger_FileStorage_flush__P58222_mk(s) {
361
361
  checkStack(s.depth);
362
362
  return {
363
- parent: s, fn: datalogger_FileStorage_flush__P58182, depth: s.depth + 1,
363
+ parent: s, fn: datalogger_FileStorage_flush__P58222, 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__P58182_mk(s) {
368
368
 
369
369
 
370
370
 
371
- function datalogger_Storage__C58139_v0_1_mk(s) {
371
+ function datalogger_Storage__C58179_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__C58139_v0_1_mk(s) {
381
381
  arg0: undefined,
382
382
  } }
383
383
 
384
- const datalogger_Storage__C58139_VT = mkVTable({
384
+ const datalogger_Storage__C58179_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": datalogger_Storage_flush__P58143,
391
+ "flush": datalogger_Storage_flush__P58183,
392
392
  },
393
393
  iface: {
394
- "flush": datalogger_Storage_flush__P58143,
394
+ "flush": datalogger_Storage_flush__P58183,
395
395
  },
396
396
  });
397
- const datalogger_FileStorage__C58177_VT = mkVTable({
397
+ const datalogger_FileStorage__C58217_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": datalogger_FileStorage_flush__P58182,
404
+ "flush": datalogger_FileStorage_flush__P58222,
405
405
  },
406
406
  iface: {
407
407
  "filename": null,
408
408
  "set/filename": null,
409
- "flush": datalogger_FileStorage_flush__P58182,
409
+ "flush": datalogger_FileStorage_flush__P58222,
410
410
  },
411
411
  });
412
412
 
413
- const breakpoints = setupDebugger(1, ["_headers___58146","_row___58150","_storage___58152"])
413
+ const breakpoints = setupDebugger(1, ["_headers___58186","_row___58190","_storage___58192"])
414
414
 
415
- return _main___P57685
415
+ return _main___P57725
416
416
  })