diff --git a/_locales/fr/README.md b/_locales/fr/README.md deleted file mode 100644 index 5d915e2..0000000 --- a/_locales/fr/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# Microsoft MakeCode extension for use with micro:bit CreateAI - -FR - This extension is leveraged by micro:bit CreateAI which creates suitable blocks based on the machine learning model you build in the app. It is not useful separate from micro:bit CreateAI. - -## Building locally - -Ensure you have the required toolchain to build for V1 and V2 -(arm-none-eabi-gcc, python, yotta, cmake, ninja, srec_cat) or docker. - -```bash -git clone https://github.com/microbit-foundation/pxt-microbit-ml -cd pxt-microbit-ml -npm install pxt --no-save -npx pxt target microbit --no-save -npx pxt install -PXT_FORCE_LOCAL=1 PXT_NODOCKER=1 npx pxt -``` - -For the V1 build Yotta can hit the GitHub rate limits quite easily if the -project is built from a clean state more than once. -A V2-only build can be performed with the `PXT_COMPILE_SWITCHES=csv---mbcodal` -environmental variable. - -``` -PXT_FORCE_LOCAL=1 PXT_NODOCKER=1 PXT_COMPILE_SWITCHES=csv---mbcodal npx pxt -``` - -## Build flags - -### Model predictions per second - -By default the model will run every 250 ms, to change this value the -`ML_INFERENCE_PERIOD_MS` config can be modified. - -```json -{ - "yotta": { - "config": { - "ML_INFERENCE_PERIOD_MS": 250 - } - } -} -``` - -### Model events - -By default this extension configures the Model prediction events to not be -queued for the same event. -So if an event raised when its handler is still running it will be dropped. - -```json -{ - "yotta": { - "config": { - "ML_EVENT_LISTENER_DEFAULT_FLAGS": 32 - } - } -} -``` - -The values are defined in the -[codal-core/inc/core/CodalListener.h](https://github.com/lancaster-university/codal-core/blob/df05db9e15499bd8906618192a4d482e3836c62f/inc/core/CodalListener.h#L36-L40) -file: - -```cpp -#define MESSAGE_BUS_LISTENER_REENTRANT 0x0008 -#define MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY 0x0010 -#define MESSAGE_BUS_LISTENER_DROP_IF_BUSY 0x0020 -#define MESSAGE_BUS_LISTENER_NONBLOCKING 0x0040 -#define MESSAGE_BUS_LISTENER_URGENT 0x0080 -``` - -### Debug messages - -To enable debug print from this extension, add the following into your -pxt.json file: - -```json -{ - "yotta": { - "config": { - "ML_DEBUG_PRINT": 1 - } - } -} -``` - -## License - -This software made available under the MIT open source license. - -[SPDX-License-Identifier: MIT](/LICENSE) - -## Code of Conduct - -Trust, partnership, simplicity and passion are our core values we live and breathe in our daily work life and within our projects. Our open-source projects are no exception. We have an active community which spans the globe and we welcome and encourage participation and contributions to our projects by everyone. We work to foster a positive, open, inclusive and supportive environment and trust that our community respects the micro:bit code of conduct. Please see our [code of conduct](https://www.microbit.org/safeguarding/) which outlines our expectations for all those that participate in our community and details on how to report any concerns and what would happen should breaches occur. diff --git a/_locales/fr/machine-learning-jsdoc-strings.json b/_locales/fr/machine-learning-jsdoc-strings.json deleted file mode 100644 index 1a5079c..0000000 --- a/_locales/fr/machine-learning-jsdoc-strings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "mlrunner.customOnEvent": "FR - Register a TypeScript function to run when an event is raised.\n* This custom version of the MakeCode onEvent function is needed due to:\nhttps://github.com/microsoft/pxt-microbit/issues/5709\n*", - "mlrunner.customOnEvent|param|flags": "FR - The specified event flags are ignored and configured via pxt.json.", - "mlrunner.customOnEvent|param|handler": "FR - The function to call when the event is detected.", - "mlrunner.customOnEvent|param|src": "FR - The ID of the component to listen to.", - "mlrunner.customOnEvent|param|value": "FR - The event value to listen to from that component." -} \ No newline at end of file diff --git a/_locales/fr/machine-learning-strings.json b/_locales/fr/machine-learning-strings.json deleted file mode 100644 index 33cdaf8..0000000 --- a/_locales/fr/machine-learning-strings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ml.event.Unknown|block": "FR - unknown", - "ml.getCertainty|block": "FR - certainty (\\%) ML $event", - "ml.isDetected|block": "FR - is ML $event detected", - "ml.onStart|block": "FR - on ML $event start", - "ml.onStopDetailed|block": "FR - on ML $event stop $duration (ms)", - "ml.onStop|block": "FR - on ML $event stop", - "mlrunner|block": "FR - mlrunner", - "{id:category}Ml": "FR - Ml", - "{id:category}MlEvent": "FR - MlEvent", - "{id:category}Mlrunner": "FR - Mlrunner", - "{id:group}micro:bit (V2)": "FR - micro:bit (V2)" -} diff --git a/_locales/fr/onstart.md b/_locales/fr/onstart.md deleted file mode 100644 index 98d791b..0000000 --- a/_locales/fr/onstart.md +++ /dev/null @@ -1,3 +0,0 @@ -# Testing block docs - -FR - You use it like this... diff --git a/docs/onstart.md b/docs/onstart.md deleted file mode 100644 index 617f79b..0000000 --- a/docs/onstart.md +++ /dev/null @@ -1,3 +0,0 @@ -# Testing block docs - -You use it like this... diff --git a/pxt.json b/pxt.json index 8ded184..e2831c1 100644 --- a/pxt.json +++ b/pxt.json @@ -12,11 +12,7 @@ "enums.d.ts", "pxtextension.ts", "pxtextension.cpp", - "docs/onstart.md", - "_locales/fr/machine-learning-jsdoc-strings.json", - "_locales/fr/machine-learning-strings.json", - "_locales/fr/README.md", - "_locales/fr/onstart.md" + "docs/on-start.md" ], "testFiles": [ "autogenerated.ts", diff --git a/pxtextension.ts b/pxtextension.ts index 2b63723..162e21e 100644 --- a/pxtextension.ts +++ b/pxtextension.ts @@ -56,7 +56,7 @@ namespace ml { //% weight=50 //% parts="v2" //% group="micro:bit (V2)" - //% help=github:pxt-microbit-ml/docs/onstart + //% help=github:pxt-microbit-ml/docs/on-start export function onStart(event: MlEvent, body: () => void): void { event.onStartHandler = body; const wrappedBody = () => { @@ -93,7 +93,6 @@ namespace ml { //% draggableParameters="reporter" //% parts="v2" //% group="micro:bit (V2)" - //% help=none export function onStopDetailed( event: MlEvent, body: (duration: number) => void @@ -109,7 +108,6 @@ namespace ml { //% weight=20 //% parts="v2" //% group="micro:bit (V2)" - //% help=none export function isDetected(event: MlEvent): boolean { if (!isRunning()) { startRunning(); @@ -122,7 +120,6 @@ namespace ml { //% block="certainty (\\%) ML $event" //% weight=10 //% parts="v2" - //% help=none export function getCertainty(event: MlEvent): number { const eventValue = event.eventValue; if (eventValue <= 1) {