Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions vendor/micropython/micropython.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4381,7 +4381,9 @@ var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {
var _mp_js_random_u32 = () =>
globalThis.crypto.getRandomValues(new Uint32Array(1))[0];

var _mp_js_ticks_ms = () => Date.now() - MP_JS_EPOCH;
var _mp_js_ticks_ms = () => (performance.now() - MP_JS_EPOCH) | 0;

var _mp_js_ticks_us = () => ((performance.now() - MP_JS_EPOCH) * 1000) | 0;

var _mp_js_time_ms = () => Date.now();

Expand Down Expand Up @@ -5210,13 +5212,28 @@ var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {

var _omnipython_sleep_ms = (ms) => Asyncify.handleSleep((wakeUp) => setTimeout(wakeUp, Math.max(0, ms)));

var _omnipython_timer_cancel = (id) => { const t=omnipython_state.timers.get(id); if (t) { t.periodic ? clearInterval(t.handle) : clearTimeout(t.handle); omnipython_state.timers.delete(id); } };

var omnipython_drop_fired = (id) => {
const fired = omnipython_state.firedTimers;
for (let i = fired.length - 1; i >= 0; i--) if (fired[i] === id) fired.splice(i, 1);
};
var _omnipython_timer_cancel = (id) => { const t=omnipython_state.timers.get(id); if (t) { t.periodic ? clearInterval(t.handle) : clearTimeout(t.handle); omnipython_state.timers.delete(id); } omnipython_drop_fired(id); };

var _omnipython_timer_poll = () => omnipython_state.firedTimers.length ? omnipython_state.firedTimers.shift() : -1;
var _omnipython_timer_poll = () => {
const state = omnipython_state;
if (!state.firedTimers.length) return -1;
const id = state.firedTimers.shift();
state.timerDeliveries.push({id, at:performance.now()});
if (state.timerDeliveries.length > 512) state.timerDeliveries.shift();
return id;
};


var _omnipython_timer_start = (id, delay, periodic) => {
const state = omnipython_state;
const old = state.timers.get(id); if (old) clearTimeout(old.handle);
const old = state.timers.get(id); if (old) old.periodic ? clearInterval(old.handle) : clearTimeout(old.handle);
// A restart drops the old timer's firings that are still queued.
omnipython_drop_fired(id);
const fire = () => {
state.timerFirings.push({id, at:performance.now()});
if (state.timerFirings.length > 512) state.timerFirings.shift();
Expand Down Expand Up @@ -5379,7 +5396,7 @@ var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {
FS.preloadFile = FS_preloadFile;
FS.staticInit();;
if (globalThis.crypto === undefined) { globalThis.crypto = require('crypto'); };
var MP_JS_EPOCH = Date.now();
var MP_JS_EPOCH = performance.now();
// End JS library code

// include: postlibrary.js
Expand Down Expand Up @@ -5839,6 +5856,7 @@ missingLibrarySymbols.forEach(missingLibrarySymbol)
'omnipython_rgba',
'omnipython_paint',
'omnipython_export_host',
'omnipython_drop_fired',
'omnipython_enable_audio',
'omnipython_disarm_audio_unlock',
'omnipython_arm_audio_unlock',
Expand Down Expand Up @@ -6238,6 +6256,8 @@ var wasmImports = {
/** @export */
mp_js_ticks_ms: _mp_js_ticks_ms,
/** @export */
mp_js_ticks_us: _mp_js_ticks_us,
/** @export */
mp_js_time_ms: _mp_js_time_ms,
/** @export */
omnipython_audio_clear: _omnipython_audio_clear,
Expand Down
Binary file modified vendor/micropython/micropython.wasm
Binary file not shown.
106 changes: 54 additions & 52 deletions vendor/micropython/micropython.wasm.provenance
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"binary": {
"name": "micropython.wasm",
"sha256": "50312eda3b1b0ae139e31b9b6703c5ecd598554a8b152694193a0693cf5dcc21",
"size": 9868644
"sha256": "bc09d80624af4874265e26030666fe1edc6100fb4f0ae972d5a442ef0eac2fac",
"size": 9870256
},
"built_by": "https://github.com/PyDevices/omnipython-builds/actions/runs/44156093615",
"built_by": "https://github.com/PyDevices/omnipython-builds/actions/runs/44390117793",
"format": 1,
"install_only": false,
"modules": "all,pdwidgets",
Expand Down Expand Up @@ -81,144 +81,146 @@
"0070-micropython-esp32-a-task-lent-a-priority-is-scheduled-at-once.patch",
"0071-micropython-esp32-a-collection-on-a-p4-no-longer-overflows-its-mark-stack.patch",
"0072-micropython-extmod-modjson-a-long-parse-lets-other-threads-in.patch",
"0073-micropython-nrf-a-softdevice-build-has-real-atomic-sections.patch"
"0073-micropython-nrf-a-softdevice-build-has-real-atomic-sections.patch",
"0074-micropython-webassembly-ticks-from-a-monotonic-clock.patch",
"0075-micropython-usb-networking-leases-name-no-dns-server.patch"
],
"port": "webassembly",
"sources": {
"audiocomponents": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"audiodsp": {
"describe": "80e3388a53ac",
"describe": "015c288600bb",
"dirty": false,
"head": "80e3388a53ace5c3afb2a765030f9969817668f7"
"head": "015c288600bbb1d58b68486bd24d58c88b0b96d7"
},
"audioeffects": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"audioif": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"audioinstruments": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"cameraif": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"castif": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"displayif": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"h264enc": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"iconkit": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"jpegio": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"mdns": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"micropython": {
"describe": "31b4a981b319"
"describe": "626771f80369"
},
"micropython-lib": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"omnipython": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"omnipython-builds": {
"describe": "c8c12c9",
"describe": "5612478",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"omnipython-lib": {
"describe": "ba56bb6813b7",
"describe": "727cc5241b5f",
"dirty": false,
"head": "ba56bb6813b74b343f6284966c7183e47613b4de"
"head": "727cc5241b5f4acc4ee8745557f0efd704136066"
},
"omnipython-lvgl": {
"describe": "3e4381e7addd",
"dirty": false,
"head": "3e4381e7addded2ac48358a1bbd6c74224711cf0"
},
"palettes": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"pdwidgets": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"pngio": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"ppa": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"pygraphics": {
"describe": "5631a56cd55e",
"dirty": false,
"head": "5631a56cd55eb8ac1e82a14396bd876ad97c889d"
},
"svgio": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"tsmux": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
},
"ulab": {
"describe": "15e999747079",
"dirty": false,
"head": "15e999747079205b2415e71a6aa2840b8f85f9dc"
},
"usbhost": {
"describe": "c8c12c9284ec",
"describe": "56124784fff8",
"dirty": false,
"head": "c8c12c9284ec09837af8de59966b169f9e9612ca"
"head": "56124784fff88b1199aea701ebf29ec04dfc313d"
}
},
"stamped": "2026-11-17T19:15:54+00:00",
"stamped": "2026-11-18T20:24:22+00:00",
"target": "mp-wasm"
}
Loading