diff --git a/docs/project-snapshot.md b/docs/project-snapshot.md index a061b1bcd..507688ce3 100644 --- a/docs/project-snapshot.md +++ b/docs/project-snapshot.md @@ -155,7 +155,7 @@ ## 代码与文档规模 -- `platform/tools`:`105` 个 Python 模块,`63228` 行;规模最大的模块如下。 +- `platform/tools`:`105` 个 Python 模块,`63237` 行;规模最大的模块如下。 | 模块 | 行数 | | --- | ---: | diff --git a/platform/tests/test_public_micropython_ui.mjs b/platform/tests/test_public_micropython_ui.mjs index f5677523c..e5f4352a8 100644 --- a/platform/tests/test_public_micropython_ui.mjs +++ b/platform/tests/test_public_micropython_ui.mjs @@ -5,7 +5,7 @@ import fs from 'node:fs/promises'; import vm from 'node:vm'; import {PublicQemuRuntime} from '../web/public-qemu-runtime.js'; import {PublicMicroPythonRunner} from '../web/public-micropython.js'; -import {MODBUS_TCP_SERVER_EXAMPLE_ID, usesExampleStation, usesTextTcpPeer} from '../web/public-network-fixtures.js'; +import {LABEL_PLUS_EXAMPLE_ID, MODBUS_TCP_SERVER_EXAMPLE_ID, usesExampleStation, usesTextTcpPeer} from '../web/public-network-fixtures.js'; import {DUAL_KMETER_EXAMPLE_ID} from '../web/public-qemu-unit-examples.js'; const source=await fs.readFile(new URL('../web/public.js',import.meta.url),'utf8'); @@ -32,7 +32,7 @@ function fixture(){ const run={kind:'browser',generation:1,controller:runtime}; const state={run,runGeneration:1}; const context={state,$:id=>nodes[id],active:value=>value===state.run&&value.generation===state.runGeneration&&!value.stopping, - PublicQemuRuntime,PublicMicroPythonRunner,DUAL_KMETER_EXAMPLE_ID,MODBUS_TCP_SERVER_EXAMPLE_ID,usesExampleStation,usesTextTcpPeer, + PublicQemuRuntime,PublicMicroPythonRunner,DUAL_KMETER_EXAMPLE_ID,LABEL_PLUS_EXAMPLE_ID,MODBUS_TCP_SERVER_EXAMPLE_ID,usesExampleStation,usesTextTcpPeer, TextEncoder,Uint8Array,DOMException, error:error=>{if(error.name!=='AbortError')errors.push(error);}}; vm.createContext(context);vm.runInContext(radio+'\n'+functions+'\n'+serial+'\n'+keyboard,context); diff --git a/platform/tests/test_public_qemu_entry.mjs b/platform/tests/test_public_qemu_entry.mjs index 9e8935755..079a59622 100644 --- a/platform/tests/test_public_qemu_entry.mjs +++ b/platform/tests/test_public_qemu_entry.mjs @@ -23,12 +23,18 @@ import * as servos8 from '../web/public-8servos-examples.js'; import * as capGps from '../web/public-cap-gps-examples.js'; import * as dofExamples from '../web/public-dof-examples.js'; import * as moduleRadios from '../web/public-module-radio-examples.js'; +import * as instruments from '../web/public-instrument-examples.js'; +import * as uartUnits from '../web/public-uart-unit-examples.js'; +import * as nbiotExamples from '../web/public-nbiot-examples.js'; +import * as mqttUnitExamples from '../web/public-mqtt-unit-examples.js'; import * as rui3Module from '../web/public-rui3-module-example.js'; import * as portAUnitExamples from '../web/public-port-a-examples.js'; import * as usbModuleExamples from '../web/public-usb-module-examples.js'; -import * as oledUnitExamples from '../web/public-oled-unit-examples.js'; +import * as displayUnitExamples from '../web/public-display-unit-examples.js'; +import * as driveModuleExamples from '../web/public-drive-module-examples.js'; import * as gpioExamples from '../web/public-gpio-unit-examples.js'; import * as portBUnitExamples from '../web/public-port-b-examples.js'; +import * as serialSensorExamples from '../web/public-serial-sensor-examples.js'; import * as pwmUnitExamples from '../web/public-pwm-unit-examples.js'; import * as thermalExamples from '../web/public-thermal-example.js'; import * as cores3SensorExamples from '../web/public-cores3-sensor-examples.js'; @@ -111,7 +117,7 @@ async function entry({search='',pageUrl=pageRoot,siteServiceUrl='',isolationErro throw new Error('Unexpected fetch '+url); }; const dependencies=Object.fromEntries(required.map(name=>[name,()=>{throw new Error(`Unexpected execution boundary ${name}`);} ])); - Object.assign(dependencies,config,firmware,demoFirmware,uiflowFirmware,cloudStatus,qemuProfiles,qemuFrame,qemuServo,qemuPeerPair,qemuUnitExamples,qrcodeModule,facesModule,envExamples,moduleLlm,miniScales,servos8,capGps,rui3Module,dofExamples,moduleRadios,gpioExamples,portAUnitExamples,usbModuleExamples,oledUnitExamples,portBUnitExamples,pwmUnitExamples,thermalExamples,cores3SensorExamples,fingerprint2,modbusRtu,networkFixtures,usbHidExamples,audioModule,{ + Object.assign(dependencies,config,firmware,demoFirmware,uiflowFirmware,cloudStatus,qemuProfiles,qemuFrame,qemuServo,qemuPeerPair,qemuUnitExamples,qrcodeModule,facesModule,envExamples,moduleLlm,miniScales,servos8,capGps,rui3Module,nbiotExamples,mqttUnitExamples,instruments,uartUnits,dofExamples,moduleRadios,gpioExamples,portAUnitExamples,usbModuleExamples,displayUnitExamples,driveModuleExamples,portBUnitExamples,serialSensorExamples,pwmUnitExamples,thermalExamples,cores3SensorExamples,fingerprint2,modbusRtu,networkFixtures,usbHidExamples,audioModule,{ siteRoot:()=>new URL(pageUrl), ensurePublicIsolation:async()=>{events.push('isolation');if(isolationError)throw isolationError;return isolation;}, PublicMicroPythonRunner,deviceIdentityCapability,GNSS_EXAMPLE_ID,supportsQemuGnssWorkbench, diff --git a/platform/tools/bootstrap_browser_runtime.py b/platform/tools/bootstrap_browser_runtime.py index da305e61e..e820de468 100644 --- a/platform/tools/bootstrap_browser_runtime.py +++ b/platform/tools/bootstrap_browser_runtime.py @@ -21,21 +21,30 @@ ROOT = Path(__file__).resolve().parents[2] SOURCE_URL = "https://github.com/m5agent/esp32sim.git" -SOURCE_COMMIT = "d9b9e92bfc924aa2ac10ea540f516a3893fa96c8" +SOURCE_COMMIT = "d1c930adffaa8d94d03856eb0276df17da668002" BOARD_PROFILES = json.loads((ROOT / "platform/web/esp32sim-browser-boards.json").read_text()) SOURCE_PROFILES = [ "m5stack-cores3", "m5stack-cores3+dual-kmeter", "m5stack-cores3+ultrasonic-i2c", "m5stack-cores3+relay", "m5stack-cores3+qrcode-module", - "m5stack-cores3+mini-scales", "m5stack-cores3+fingerprint2", "m5stack-cores3+8servos", "m5stack-cores3+rui3-module", "m5stack-cores3+hall-effect", + "m5stack-cores3+mini-scales", "m5stack-cores3+finger-unit", "m5stack-cores3+fingerprint2", "m5stack-cores3+8servos", "m5stack-cores3+rui3-module", "m5stack-cores3+hall-effect", "m5stack-cores3+dof6", "m5stack-cores3+dof9", "m5stack-cores3+dof10", "m5stack-cores3+bmm350", - "m5stack-cores3+cc1101", "m5stack-cores3+lora868-v12", "m5stack-cores3+lora1262", + "m5stack-cores3+cc1101", "m5stack-cores3+lora868-sx1276", "m5stack-cores3+lora868-v12", "m5stack-cores3+lora1262", "m5stack-cores3+usb-module-gpio", "m5stack-cores3+usb-module-mouse", - "m5stack-cores3+glass", "m5stack-cores3+glass2", "m5stack-cores3+mini-oled", "m5stack-cores3+oled", + "m5stack-cores3+sim7020", "m5stack-cores3+sim7028", + "m5stack-cores3+mqtt-unit", "m5stack-cores3+mqttpoe-unit", + "m5stack-cores3+dc-motor-module", "m5stack-cores3+fan-module", + "m5stack-cores3+bldc-driver", "m5stack-cores3+hbridge", + "m5stack-cores3+lcd-unit", "m5stack-cores3+glass", "m5stack-cores3+glass2", "m5stack-cores3+mini-oled", "m5stack-cores3+oled", + "m5stack-cores3+laser-tx", "m5stack-cores3+midi-unit", "m5stack-cores3+synth-unit", "m5stack-cores3+asr-unit", + "m5stack-cores3+ecg-module", + "m5stack-cores3+module-16340", "m5stack-cores3+pps-module", "m5stack-cores3+rs232-module", + "m5stack-cores3+weight-unit", "m5stack-cores3+zigbee-unit", "m5stack-cores3+zigbee-module", + "m5stack-cores3+uhf-rfid-unit", "m5stack-cores3+env-iii", "m5stack-cores3+env-pro", - "m5stack-cores3+audio-module", "m5stack-cores3+byteswitch", "m5stack-cores3+step16", "m5stack-cores3+ncir2", + "m5stack-cores3+audio-module", "m5stack-cores3+pdm-unit", "m5stack-cores3+byteswitch", "m5stack-cores3+step16", "m5stack-cores3+ncir2", "m5stack-cores3+key-unit", "m5stack-cores3+fader-unit", "m5stack-cores3+flashlight-unit", "m5stack-cores3+servo180", "m5stack-cores3+servo360", "m5stack-cores3+catch-unit", - "m5stack-cores3+watering-unit", "m5stack-cores3+grove2grove-unit", + "m5stack-cores3+rf433t-unit", "m5stack-cores3+watering-unit", "m5stack-cores3+grove2grove-unit", "m5stack-cores3+thermal-unit", "m5stack-cores3+nfc-unit", "m5stack-cores3+faces-calculator", "m5stack-cores3+faces-keyboard", "m5stack-cores3+faces-gamepad", "m5stack-cores3+acssr-rtu", "m5stack-cores3+modbus-rtu-master", "m5stack-cores3+modbus-rtu-slave", diff --git a/platform/web/index.html b/platform/web/index.html index d90aa933a..36fc722ad 100644 --- a/platform/web/index.html +++ b/platform/web/index.html @@ -157,6 +157,21 @@

虚拟相机预览

8Servos 输出

+ + +